Implementing enterprise level business information networking

ABSTRACT

Systems, apparatus, and methods for implementing enterprise level social and business information networking are provided. Users can receive relevant information about a database system and its users at an appropriate time. Users can then use this relevant information to reduce errors and limit redundant efforts. For example, an update of a record in the database can be identified, and a story created automatically about the update and sent to the users that are following the record. Which updates have stories created and which stories are to be sent to which users can be configured. Other events besides updating of records can also be tracked. For example, actions of a user that result in an event can be tracked, where such tracking can also be configurable. Subscriptions to follow an object can be automatic, and access checks can be used to ensure that unauthorized users do not see certain data.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/260,653, filed Nov. 12, 2009 entitled “Systems and Methods forImplementing Enterprise Level Social and Business InformationNetworking”, the entire contents of which are herein incorporated byreference for all purposes. This application is related to concurrentlyfiled and commonly owned U.S. Patent Applications entitled “Security InEnterprise Level Business Information Networking” by Lee et al. U.S.patent application Ser. No. 12/945,715), “Customizing Enterprise LevelBusiness Information Networking” by Lee et al. U.S. patent applicationSer. No. 12/945,577), “Subscriptions for Enterprise Level BusinessInformation Networking” by Lee et al. U.S. patent application Ser. No.12/945,417), and “Enterprise Level Business Information Networking ForChanges In A Database” by Lee et al. U.S. patent application Ser. No.12/945,410), the disclosures of which are incorporated by reference intheir entirety.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by anyone of the patent documentor the patent disclosure, as it appears in the Patent and TrademarkOffice patent file or records, but otherwise reserves all copyrightrights whatsoever.

BACKGROUND

The present invention relates generally to database systems, and moreparticularly to implementing enterprise level business informationnetworking.

The subject matter discussed in the background section should not beassumed to be prior art merely as a result of its mention in thebackground section. Similarly, a problem mentioned in the backgroundsection or associated with the subject matter of the background sectionshould not be assumed to have been previously recognized in the priorart. The subject matter in the background section merely representsdifferent approaches, which in and of themselves may also be inventions.

Using present database systems, it is difficult to know about theactivity of others users of a database system. For example, the activityof another user may be important to the user's boss. The user can createa report about what the user has done and send it to the boss, but suchreports may be inefficient, not timely, and incomplete. Also, it may bedifficult to know other people who might benefit from the information inthe report.

Therefore it is desirable to provide systems and methods that overcomethe above and other problems.

BRIEF SUMMARY

Embodiments described herein provides systems, apparatus, and methodsfor implementing enterprise level social and business informationnetworking. These mechanisms and methods can provide users with relevantinformation about a database system and its users at an appropriate time(e.g. in real-time). Users can then use this relevant information, forexample, to reduce errors and limit redundant efforts.

As an example, an update of a record in the database can be identified,and a story can be created automatically by the database system aboutthe update and sent to the users that are following the record. Thedatabase system can provide configuration of which updates have storiescreated and which stories are to be sent to which users. Other eventsbesides updating of records can also be tracked. For example, actions ofa user that result in an event can be tracked, where such tracking canalso be configurable.

In an embodiment and by way of example, a method of tracking updates toa database system is provided. The database system receives (e.g. from afirst user) a request to update a first record of a database of thedatabase system. The database system creates a story about the update.The story is posted to a first feed associated with the update.

Other embodiments of the invention are directed to systems and computerreadable media associated with methods described herein.

While the present invention is described with reference to an embodimentin which techniques for performing searches of feeds in an on-demandenterprise services environment are implemented in a system having anapplication server providing a front end for an on-demand databaseservice capable of supporting multiple tenants, the present invention isnot limited to multi-tenant databases nor deployment on applicationservers. Embodiments may be practiced using other databasearchitectures, i.e., ORACLE®, DB2® by IBM and the like without departingfrom the scope of the embodiments claimed.

Any of the above embodiments may be used alone or together with oneanother in any combination. Inventions encompassed within thisspecification may also include embodiments that are only partiallymentioned or alluded to or are not mentioned or alluded to at all inthis brief summary or in the abstract. Although various embodiments ofthe invention may have been motivated by various deficiencies with theprior art, which may be discussed or alluded to in one or more places inthe specification, the embodiments of the invention do not necessarilyaddress any of these deficiencies. In other words, different embodimentsof the invention may address different deficiencies that may bediscussed in the specification. Some embodiments may only partiallyaddress some deficiencies or just one deficiency that may be discussedin the specification, and some embodiments may not address any of thesedeficiencies.

BRIEF DESCRIPTION OF THE DRAWINGS

In the following drawings like reference numbers are used to refer tolike elements. Although the following figures depict various examples ofthe invention, the invention is not limited to the examples depicted inthe figures.

FIG. 1 illustrates a block diagram of an example of an environmentwherein an on-demand database service might be used.

FIG. 2 illustrates a block diagram of an embodiment of elements of FIG.1 and various possible interconnections between these elements.

FIG. 3 is a flowchart of a method 300 for tracking updates to a recordstored in a database system according to one or more embodiments.

FIG. 4 is a block diagram of components of a database system performinga method for tracking an update to a record according to one or moreembodiments.

FIG. 5 is a flowchart of a method 500 for tracking actions of a user ofa database system according to one or more embodiments.

FIG. 6 is a flowchart of a method 600 for creating a news feed frommessages created by a first user about a record or another useraccording to one or more embodiments.

FIG. 7 shows an example of a group feed on a group page according to oneor more embodiments.

FIG. 8 shows an example of a record feed containing a story, post, andcomments according to one or more embodiments.

FIG. 9A shows a plurality of tables that may be used in tracking eventsand creating feeds according to one or more embodiments.

FIG. 9B shows a flowchart illustrating a method 900 for automaticallysubscribing a user to an object in a database system according toembodiments.

FIG. 10 is a flowchart of a method 1000 for saving information to feedtracking tables according to one or more embodiments.

FIG. 11 is a flowchart of a method 1100 for reading a feed item as partof generating a feed for display according to one or more embodiments.

FIG. 12 is a flowchart of a method 1200 for reading a feed item of aprofile feed for display according to one or more embodiments.

FIG. 13 is a flowchart of a method 1300 of storing event information forefficient generation of feed items to display in a feed according to oneor more embodiments.

FIG. 14 is a flowchart of a method 1400 for creating a custom feed forusers of a database system using filtering criteria according toembodiments.

DEFINITIONS

As used herein, the term “multi-tenant database system” refers to thosesystems in which various elements of hardware and software of thedatabase system may be shared by one or more customers. For example, agiven application server may simultaneously process requests for a greatnumber of customers, and a given database table may store rows for apotentially much greater number of customers. As used herein, the term“query plan” refers to a set of steps used to access information in adatabase system.

As used herein, the term “user's profile” includes data about the userof the database system. The data can include general information, suchas title, phone number, a photo, a biographical summary, and a status(e.g., text describing what the user is currently doing). As mentionedbelow, the data can include messages created by other users. Where thereare multiple tenants, a user is typically associated with a particulartenant. For example, a user could be a salesperson of a company that isa tenant of the database system that provides a database service.

As used herein, the term “record” refers to an instance of a data objectcreated by a user of the database service, for example, about aparticular (actual or potential) business relationship or project. Thedata object can have a data structure defined by the database service (astandard object) or defined by a subscriber (custom object). Forexample, a record can be for a business partner or potential businesspartner (e.g. a client, vendor, distributor, etc.) of the user, and caninclude an entire company, subsidiaries, or contacts at the company. Asanother example, a record can be a project that the user is working on,such as an opportunity (e.g. a possible sale) with an existing partner,or a project that the user is trying to get. In one embodimentimplementing a multi-tenant database, all of the records for the tenantshave an identifier stored in a common table. A record has data fieldsthat are defined by the structure of the object (e.g. fields of certaindata types and purposes). A record can also have custom fields definedby a user. A field can be another record or include links thereto,thereby providing a parent-child relationship between the records.

As used herein, the term “feed” includes a combination (e.g. a list) offeed items. As user herein, the term “feed item” (or feed element)refers to information about a user (“profile feed”) of the database orabout a record (“record feed”) in the database. A user following theuser or record can receive the associated feed items. The feed itemsfrom all of the followed users and records can be combined into a singlefeed for the user.

As examples, a “feed item” can be a message and story (also called afeed tracked change). A feed can be a combination of messages andstories. Messages include text created by a user, and may include otherdata as well. Examples of messages include posts, status updates, andcomments. Messages can be created for a user's profile or for a record.Posts can be created by various users, potentially any user, althoughsome restrictions can be applied. As an example, posts can be made to awall section of a user's profile (which can include a number of recentposts) or a section of a record that includes multiple posts. The postscan be organized in chronological order. In contrast to a post, a statusupdate changes a status of a user and is made by that user. Othersimilar sections of a user's profile can also include an “About”section. A record can also have a status, whose update can be restrictedto the owner of the record. The owner can be a single user, multipleusers, or a group. In one embodiment, there is only one status for arecord. In one embodiment, a comment can be made on any feed item. Inanother embodiment, comments are organized as a list explicitly tied toa particular story, post, or status update. In this embodiment, commentsmay not be listed in the first layer (in a hierarchal sense) of feeditems, but listed as a second layer branching from a particular firstlayer feed item.

A “story” is data representing an event, and can include text generatedby the database system in response to the event. In one embodiment, thedata can initially be stored, and then the database system can later usethe data to create text for describing the event. Both the data and/orthe text can be a story, as used herein. In various embodiments, anevent can be an update of a record and/or can be triggered by a specificaction by a user. Which actions trigger an event can be configurable.Which events have stories created and which stories are sent to whichusers can also be configurable. Messages and stories can be stored as afield or child object of the record. For example, the feed can be storedas a child object of the record.

As used herein, a “group” is a collection of users. In some aspects, thegroup may be defined as users with a same or similar attribute, or bymembership. In one embodiment, a “group feed” includes any feed itemabout any user in a group. In another embodiment, a “group feed”includes feed items that are about the group as a whole. In oneimplementation, the feed items for a group are only posts and comments.

As used herein, an “entity feed” or “record feed” refers to a feed offeed items about a particular record in the database, such as storiesabout changes to the record and posts made by users about the record. Anentity feed can be composed of any type of feed item. Such a feed can bedisplayed on a page (e.g. a web page) associated with the record (e.g. ahome page of the record). As used herein, a “profile feed” is a feed offeed items about a particular user. In one embodiment, the feed itemsfor a profile feed are posts and comments that other users make about orsend to the particular user, and status updates made by the user. Such aprofile feed can be displayed on a page associated with the particularuser. In another embodiment, feed items in a profile feed could includeposts made by the particular user and feed tracked changes (stories)initiated based on actions of the particular user.

DETAILED DESCRIPTION I. General Overview

Systems, apparatus, and methods are provided for implementing enterpriselevel social and business information networking. Such embodiments canprovide more efficient use of a database system. For instance, a user ofa database system may not easily know when important information in thedatabase has changed, e.g., about a project or client. Embodiments canprovide stories about such changes and other events, thereby keepingusers informed.

By way of example, a user can update a record (e.g. an opportunity suchas a possible sale of 1000 computers). Once the update has been made, astory about the update can then automatically be sent (e.g. in a feed)to anyone subscribing to the opportunity or to the user. Thus, the userdoes not need to contact a manager regarding the change in theopportunity, since the story about the update is sent via a feed rightto the manager's feed page (or other page).

Next, mechanisms and methods for providing systems and methods forimplementing enterprise level social and business information networkingwill be described with reference to example embodiments. First, anoverview of an example database system is described, and then examplesof tracking events for a record, actions of a user, and messages about auser or record are described. Various embodiments about the datastructure of feeds, customizing feeds, user selection of records andusers to follow, generating feeds, and displaying feeds are alsodescribed.

II. System Overview

FIG. 1 illustrates a block diagram of an environment 10 wherein anon-demand database service might be used. Environment 10 may includeuser systems 12, network 14, system 16, processor system 17, applicationplatform 18, network interface 20, tenant data storage 22, system datastorage 24, program code 26, and process space 28. In other embodiments,environment 10 may not have all of the components listed and/or may haveother elements instead of, or in addition to, those listed above.

Environment 10 is an environment in which an on-demand database serviceexists. User system 12 may be any machine or system that is used by auser to access a database user system. For example, any of user systems12 can be a handheld computing device, a mobile phone, a laptopcomputer, a work station, and/or a network of computing devices. Asillustrated in FIG. 1 (and in more detail in FIG. 2) user systems 12might interact via a network 14 with an on-demand database service,which is system 16.

An on-demand database service, such as system 16, is a database systemthat is made available to outside users that do not need to necessarilybe concerned with building and/or maintaining the database system, butinstead may be available for their use when the users need the databasesystem (e.g., on the demand of the users). Some on-demand databaseservices may store information from one or more tenants stored intotables of a common database image to form a multi-tenant database system(MTS). Accordingly, “on-demand database service 16” and “system 16” willbe used interchangeably herein. A database image may include one or moredatabase objects. A relational database management system (RDMS) or theequivalent may execute storage and retrieval of information against thedatabase object(s). Application platform 18 may be a framework thatallows the applications of system 16 to run, such as the hardware and/orsoftware, e.g., the operating system. In an embodiment, on-demanddatabase service 16 may include an application platform 18 that enablescreation, managing and executing one or more applications developed bythe provider of the on-demand database service, users accessing theon-demand database service via user systems 12, or third partyapplication developers accessing the on-demand database service via usersystems 12.

The users of user systems 12 may differ in their respective capacities,and the capacity of a particular user system 12 might be entirelydetermined by permissions (permission levels) for the current user. Forexample, where a salesperson is using a particular user system 12 tointeract with system 16, that user system has the capacities allotted tothat salesperson. However, while an administrator is using that usersystem to interact with system 16, that user system has the capacitiesallotted to that administrator. In systems with a hierarchical rolemodel, users at one permission level (profile type) may have access toapplications, data, and database information accessible by a lowerpermission level user, but may not have access to certain applications,database information, and data accessible by a user at a higherpermission level. Thus, different users will have different capabilitieswith regard to accessing and modifying application and databaseinformation, depending on a user's security or permission level, alsocalled authorization.

Network 14 is any network or combination of networks of devices thatcommunicate with one another. For example, network 14 can be any one orany combination of a LAN (local area network), WAN (wide area network),telephone network, wireless network, point-to-point network, starnetwork, token ring network, hub network, or other appropriateconfiguration. As the most common type of computer network in currentuse is a TCP/IP (Transfer Control Protocol and Internet Protocol)network, such as the global internetwork of networks often referred toas the “Internet” with a capital “I,” that network will be used in manyof the examples herein. However, it should be understood that thenetworks that the present invention might use are not so limited,although TCP/IP is a frequently implemented protocol.

User systems 12 might communicate with system 16 using TCP/IP and, at ahigher network level, use other common Internet protocols tocommunicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTPis used, user system 12 might include an HTTP client commonly referredto as a “browser” for sending and receiving HTTP messages to and from anHTTP server at system 16. Such an HTTP server might be implemented asthe sole network interface between system 16 and network 14, but othertechniques might be used as well or instead. In some implementations,the interface between system 16 and network 14 includes load sharingfunctionality, such as round-robin HTTP request distributors to balanceloads and distribute incoming HTTP requests evenly over a plurality ofservers. At least as for the users that are accessing that server, eachof the plurality of servers has access to the MTS' data; however, otheralternative configurations may be used instead.

In one embodiment, system 16, shown in FIG. 1, implements a web-basedcustomer relationship management (CRM) system. For example, in oneembodiment, system 16 includes application servers configured toimplement and execute CRM software applications as well as providerelated data, code, forms, webpages and other information to and fromuser systems 12 and to store to, and retrieve from, a database systemrelated data, objects, and Webpage content. With a multi-tenant system,data for multiple tenants may be stored in the same physical databaseobject, however, tenant data typically is arranged so that data of onetenant is kept logically separate from that of other tenants so that onetenant does not have access to another tenant's data, unless such datais expressly shared. In certain embodiments, system 16 implementsapplications other than, or in addition to, a CRM application. Forexample, system 16 may provide tenant access to multiple hosted(standard and custom) applications, including a CRM application. User(or third party developer) applications, which may or may not includeCRM, may be supported by the application platform 18, which managescreation, storage of the applications into one or more database objectsand executing of the applications in a virtual machine in the processspace of the system 16.

One arrangement for elements of system 16 is shown in FIG. 1, includinga network interface 20, application platform 18, tenant data storage 22for tenant data 23, system data storage 24 for system data 25 accessibleto system 16 and possibly multiple tenants, program code 26 forimplementing various functions of system 16, and a process space 28 forexecuting MTS system processes and tenant-specific processes, such asrunning applications as part of an application hosting service.Additional processes that may execute on system 16 include databaseindexing processes.

Several elements in the system shown in FIG. 1 include conventional,well-known elements that are explained only briefly here. For example,each user system 12 could include a desktop personal computer,workstation, laptop, PDA, cell phone, or any wireless access protocol(WAP) enabled device or any other computing device capable ofinterfacing directly or indirectly to the Internet or other networkconnection. User system 12 typically runs an HTTP client, e.g., abrowsing program, such as Microsoft's Internet Explorer browser,Netscape's Navigator browser, Opera's browser, or a WAP-enabled browserin the case of a cell phone, PDA or other wireless device, or the like,allowing a user (e.g., subscriber of the multi-tenant database system)of user system 12 to access, process and view information, pages andapplications available to it from system 16 over network 14. Each usersystem 12 also typically includes one or more user interface devices,such as a keyboard, a mouse, trackball, touch pad, touch screen, pen orthe like, for interacting with a graphical user interface (GUI) providedby the browser on a display (e.g., a monitor screen, LCD display, etc.)in conjunction with pages, forms, applications and other informationprovided by system 16 or other systems or servers. For example, the userinterface device can be used to access data and applications hosted bysystem 16, and to perform searches on stored data, and otherwise allow auser to interact with various GUI pages that may be presented to a user.As discussed above, embodiments are suitable for use with the Internet,which refers to a specific global internetwork of networks. However, itshould be understood that other networks can be used instead of theInternet, such as an intranet, an extranet, a virtual private network(VPN), a non-TCP/IP based network, any LAN or WAN or the like.

According to one embodiment, each user system 12 and all of itscomponents are operator configurable using applications, such as abrowser, including computer code run using a central processing unitsuch as an Intel Pentium® processor or the like. Similarly, system 16(and additional instances of an MTS, where more than one is present) andall of their components might be operator configurable usingapplication(s) including computer code to run using a central processingunit such as processor system 17, which may include an Intel Pentium®processor or the like, and/or multiple processor units. A computerprogram product embodiment includes a machine-readable storage medium(media) having instructions stored thereon/in which can be used toprogram a computer to perform any of the processes of the embodimentsdescribed herein. Computer code for operating and configuring system 16to intercommunicate and to process webpages, applications and other dataand media content as described herein are preferably downloaded andstored on a hard disk, but the entire program code, or portions thereof,may also be stored in any other volatile or non-volatile memory mediumor device as is well known, such as a ROM or RAM, or provided on anymedia capable of storing program code, such as any type of rotatingmedia including floppy disks, optical discs, digital versatile disk(DVD), compact disk (CD), microdrive, and magneto-optical disks, andmagnetic or optical cards, nanosystems (including molecular memory ICs),or any type of media or device suitable for storing instructions and/ordata. Additionally, the entire program code, or portions thereof, may betransmitted and downloaded from a software source over a transmissionmedium, e.g., over the Internet, or from another server, as is wellknown, or transmitted over any other conventional network connection asis well known (e.g., extranet, VPN, LAN, etc.) using any communicationmedium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as arewell known. It will also be appreciated that computer code forimplementing embodiments of the present invention can be implemented inany programming language that can be executed on a client system and/orserver or server system such as, for example, C, C++, HTML, any othermarkup language, Java™, JavaScript, ActiveX, any other scriptinglanguage, such as VBScript, and many other programming languages as arewell known may be used. (Java™ is a trademark of Sun Microsystems,Inc.).

According to one embodiment, each system 16 is configured to providewebpages, forms, applications, data and media content to user (client)systems 12 to support the access by user systems 12 as tenants of system16. As such, system 16 provides security mechanisms to keep eachtenant's data separate unless the data is shared. If more than one MTSis used, they may be located in close proximity to one another (e.g., ina server farm located in a single building or campus), or they may bedistributed at locations remote from one another (e.g., one or moreservers located in city A and one or more servers located in city B). Asused herein, each MTS could include one or more logically and/orphysically connected servers distributed locally or across one or moregeographic locations. Additionally, the term “server” is meant toinclude a computer system, including processing hardware and processspace(s), and an associated storage system and database application(e.g., OODBMS or RDBMS) as is well known in the art. It should also beunderstood that “server system” and “server” are often usedinterchangeably herein. Similarly, the database object described hereincan be implemented as single databases, a distributed database, acollection of distributed databases, a database with redundant online oroffline backups or other redundancies, etc., and might include adistributed database or storage network and associated processingintelligence.

FIG. 2 also illustrates environment 10. However, in FIG. 2 elements ofsystem 16 and various interconnections in an embodiment are furtherillustrated. FIG. 2 shows that user system 12 may include processorsystem 12A, memory system 12B, input system 12C, and output system 12D.FIG. 2 shows network 14 and system 16. FIG. 2 also shows that system 16may include tenant data storage 22, tenant data 23, system data storage24, system data 25, User Interface (UI) 30, Application ProgramInterface (API) 32, PL/SOQL 34, save routines 36, application setupmechanism 38, applications servers 100 ₁-100 _(N), system process space102, tenant process spaces 104, tenant management process space 110,tenant storage area 112, user storage 114, and application metadata 116.In other embodiments, environment 10 may not have the same elements asthose listed above and/or may have other elements instead of, or inaddition to, those listed above.

User system 12, network 14, system 16, tenant data storage 22, andsystem data storage 24 were discussed above in FIG. 1. Regarding usersystem 12, processor system 12A may be any combination of one or moreprocessors. Memory system 12B may be any combination of one or morememory devices, short term, and/or long term memory. Input system 12Cmay be any combination of input devices, such as one or more keyboards,mice, trackballs, scanners, cameras, and/or interfaces to networks.Output system 12D may be any combination of output devices, such as oneor more monitors, printers, and/or interfaces to networks. As shown byFIG. 2, system 16 may include a network interface 20 (of FIG. 1)implemented as a set of HTTP application servers 100, an applicationplatform 18, tenant data storage 22, and system data storage 24. Alsoshown is system process space 102, including individual tenant processspaces 104 and a tenant management process space 110. Each applicationserver 100 may be configured to tenant data storage 22 and the tenantdata 23 therein, and system data storage 24 and the system data 25therein to serve requests of user systems 12. The tenant data 23 mightbe divided into individual tenant storage areas 112, which can be eithera physical arrangement and/or a logical arrangement of data. Within eachtenant storage area 112, user storage 114 and application metadata 116might be similarly allocated for each user. For example, a copy of auser's most recently used (MRU) items might be stored to user storage114. Similarly, a copy of MRU items for an entire organization that is atenant might be stored to tenant storage area 112. A UI 30 provides auser interface and an API 32 provides an application programmerinterface to system 16 resident processes to users and/or developers atuser systems 12. The tenant data and the system data may be stored invarious databases, such as one or more Oracle™ databases.

Application platform 18 includes an application setup mechanism 38 thatsupports application developers' creation and management ofapplications, which may be saved as metadata into tenant data storage 22by save routines 36 for execution by subscribers as one or more tenantprocess spaces 104 managed by tenant management process 110 for example.Invocations to such applications may be coded using PL/SOQL 34 thatprovides a programming language style interface extension to API 32. Adetailed description of some PL/SOQL language embodiments is discussedin commonly owned co-pending U.S. Provisional Patent Application60/828,192 entitled, PROGRAMMING LANGUAGE METHOD AND SYSTEM FOREXTENDING APIS TO EXECUTE IN CONJUNCTION WITH DATABASE APIS, by CraigWeissman, filed Oct. 4, 2006, which is incorporated in its entiretyherein for all purposes. Invocations to applications may be detected byone or more system processes, which manages retrieving applicationmetadata 116 for the subscriber making the invocation and executing themetadata as an application in a virtual machine.

Each application server 100 may be communicably coupled to databasesystems, e.g., having access to system data 25 and tenant data 23, via adifferent network connection. For example, one application server 100 ₁might be coupled via the network 14 (e.g., the Internet), anotherapplication server 100 _(N-1) might be coupled via a direct networklink, and another application server 100 _(N) might be coupled by yet adifferent network connection. Transfer Control Protocol and InternetProtocol (TCP/IP) are typical protocols for communicating betweenapplication servers 100 and the database system. However, it will beapparent to one skilled in the art that other transport protocols may beused to optimize the system depending on the network interconnect used.

In certain embodiments, each application server 100 is configured tohandle requests for any user associated with any organization that is atenant. Because it is desirable to be able to add and remove applicationservers from the server pool at any time for any reason, there ispreferably no server affinity for a user and/or organization to aspecific application server 100. In one embodiment, therefore, aninterface system implementing a load balancing function (e.g., an F5Big-IP load balancer) is communicably coupled between the applicationservers 100 and the user systems 12 to distribute requests to theapplication servers 100. In one embodiment, the load balancer uses aleast connections algorithm to route user requests to the applicationservers 100. Other examples of load balancing algorithms, such as roundrobin and observed response time, also can be used. For example, incertain embodiments, three consecutive requests from the same user couldhit three different application servers 100, and three requests fromdifferent users could hit the same application server 100. In thismanner, system 16 is multi-tenant, wherein system 16 handles storage of,and access to, different objects, data and applications across disparateusers and organizations.

As an example of storage, one tenant might be a company that employs asales force where each salesperson uses system 16 to manage their salesprocess. Thus, a user might maintain contact data, leads data, customerfollow-up data, performance data, goals and progress data, etc., allapplicable to that user's personal sales process (e.g., in tenant datastorage 22). In an example of a MTS arrangement, since all of the dataand the applications to access, view, modify, report, transmit,calculate, etc., can be maintained and accessed by a user system havingnothing more than network access, the user can manage his or her salesefforts and cycles from any of many different user systems. For example,if a salesperson is visiting a customer and the customer has Internetaccess in their lobby, the salesperson can obtain critical updates as tothat customer while waiting for the customer to arrive in the lobby.

While each user's data might be separate from other users' dataregardless of the employers of each user, some data might beorganization-wide data shared or accessible by a plurality of users orall of the users for a given organization that is a tenant. Thus, theremight be some data structures managed by system 16 that are allocated atthe tenant level while other data structures might be managed at theuser level. Because an MTS might support multiple tenants includingpossible competitors, the MTS should have security protocols that keepdata, applications, and application use separate. Also, because manytenants may opt for access to an MTS rather than maintain their ownsystem, redundancy, up-time, and backup are additional functions thatmay be implemented in the MTS. In addition to user-specific data andtenant-specific data, system 16 might also maintain system level datausable by multiple tenants or other data. Such system level data mightinclude industry reports, news, postings, and the like that are sharableamong tenants.

In certain embodiments, user systems 12 (which may be client systems)communicate with application servers 100 to request and updatesystem-level and tenant-level data from system 16 that may requiresending one or more queries to tenant data storage 22 and/or system datastorage 24. System 16 (e.g., an application server 100 in system 16)automatically generates one or more SQL statements (e.g., one or moreSQL queries) that are designed to access the desired information. Systemdata storage 24 may generate query plans to access the requested datafrom the database.

Each database can generally be viewed as a collection of objects, suchas a set of logical tables, containing data fitted into predefinedcategories. A “table” is one representation of a data object, and may beused herein to simplify the conceptual description of objects and customobjects according to the present invention. It should be understood that“table” and “object type” may be used interchangeably herein. Each tablegenerally contains one or more data categories logically arranged ascolumns or fields in a viewable schema. Each row or record of a tablecontains an instance of data for each category (type) defined by thefields. For example, a CRM database may include a table that describes acustomer with fields for basic contact information such as name,address, phone number, fax number, etc. Another table might describe apurchase order, including fields for information such as customer,product, sale price, date, etc. In some multi-tenant database systems,standard entity tables might be provided for use by all tenants. For CRMdatabase applications, such standard entities might include tables forAccount, Contact, Lead, Opportunity data, and other object types, eachcontaining pre-defined fields. It should be understood that the word“entity” may also be used interchangeably herein with “object” and“table”, when entity or object is referring to a collection of objectsor entities of a particular type.

In some multi-tenant database systems, tenants may be allowed to createand store custom objects, or they may be allowed to customize standardentities or objects, for example by creating custom fields for standardobjects, including custom index fields. U.S. patent application Ser. No.10/817,161, filed Apr. 2, 2004, entitled “Custom Entities and Fields ina Multi-Tenant Database System”, and which is hereby incorporated hereinby reference, teaches systems and methods for creating custom objects aswell as customizing standard objects in a multi-tenant database system.In certain embodiments, for example, all custom entity data rows arestored in a single multi-tenant physical table, which may containmultiple logical tables per organization. It is transparent to customersthat their multiple “tables” are in fact stored in one large table orthat their data may be stored in the same table as the data of othercustomers.

III. Tracking Updates to a Record Stored in a Database

As multiple users might be able to change the data of a record, it canbe useful for certain users to be notified when a record is updated.Also, even if a user does not have authority to change a record, theuser still might want to know when there is an update. For example, avendor may negotiate a new price with a salesperson of company X, wherethe salesperson is a user associated with tenant X. As part of creatinga new invoice or for accounting purposes, the salesperson can change theprice saved in the database. It may be important for co-workers to knowthat the price has changed. The salesperson could send an e-mail tocertain people, but this is onerous and the salesperson might not e-mailall of the people who need to know or want to know. Accordingly,embodiments can inform others (e.g. co-workers) who want to know aboutan update to a record automatically.

FIG. 3 is a flowchart of a method 300 for tracking updates to a recordstored in a database system according to embodiments. In someembodiments, method 300 (and other methods described herein) may beimplemented at least partially with multi-tenant database system 16,e.g., by one or more processors configured to receive or retrieveinformation, process the information, store results, and the transmitthe results. In other embodiments, method 300 may be implemented atleast partially with a single tenant database system. In variousembodiments, steps may be omitted, combined, or split into additionalsteps for method 300, as well as for other methods described herein.

In step 310, the database system receives a request to update a firstrecord. In one embodiment, the request is received from a first user.For example, a user may be accessing a page associated with the firstrecord, and may change a displayed field and hit save. In anotherembodiment, the database system can automatically create the request.For instance, the database system can create the request in response toanother event, e.g., a request to change a field could be sentperiodically at a particular date and/or time of day, or a change toanother field or object. The database system can obtain a new valuebased on other fields of a record and/or based on parameters in thesystem.

The request for the update of a field of a record is an example of anevent associated with the first record for which a story may be created.In other embodiments, the database system can identify other eventsbesides updates to fields of a record. For example, an event can be asubmission of approval to change a field. Such an event can also have anassociated field (e.g., a field showing a status of whether a change hasbeen submitted). Other examples of events can include creation of arecord, deletion of a record, converting a record from one type toanother (e.g. converting a lead to an opportunity), closing a record(e.g. a case type record), and potentially any state change of arecord—any of which could include a field change associated with thestate change. Any of these events update the record whether by changinga field of the record, a state of the record, or some othercharacteristic or property of the record. In one embodiment, a list ofsupported events for creating a story can be maintained within thedatabase system, e.g., at a server or in a database.

In step 320, the database system writes new data to the first record. Inone embodiment, the new data may include a new value that replaces olddata. For example, a field is updated with a new value. In anotherembodiment, the new data can be a value for a field that did not containdata before. In yet another embodiment, the new data could be a flag,e.g., for a status of the record, which can be stored as a field of therecord.

In some embodiments, a “field” can also include records that are childobjects of the first record. A child object itself can include furtherfields. Thus, if a field of a child object is updated with a new value,the parent record also can be considered to have a field changed. In oneexample, a field could be a list of related child objects, also called arelated list.

In step 330, a story is generated about the update. In one embodiment,the story is created in parts for assembling later into a displayversion. For example, event entries can be created and tracked in onetable, and changed field entries can be tracked in another table that iscross-referenced with the first table. More specifics of suchembodiments are provided later, e.g., with respect to FIG. 9A. Inanother embodiment, the story is automatically generated by the databasesystem. The story can convey in words that the first record has beenupdated and provide details about what was updated in the record and whoperformed the update. In some embodiments, a story is generated for onlycertain types of event and/or updates associated with the first record.

In one embodiment, a tenant (e.g. through an administrator) canconfigure the database system to create (enable) stories only forcertain types of records. For example, an administrator can specify thatrecords of type Account and Opportunity are enabled. When an update (orother event) is received for the enabled record type, then a story wouldbe generated. In another embodiment, a tenant can also specify thefields of a record whose changes are to be tracked, and for whichstories are created. In one aspect, a maximum number of fields can bespecified for tracking, and may include custom fields. In oneimplementation, the type of change can also be specified, for example,that the value change of a field is required to be larger than athreshold (e.g. an absolute amount or a percentage change). In yetanother embodiment, a tenant can specify which events are to cause ageneration of a story. Also, in one implementation, individual users canspecify configurations specific to them, which can create custom feedsas described in more detail below.

In one embodiment, changes to fields of a child object are not trackedto create stories for the parent record. In another embodiment, thechanges to fields of a child object can be tracked to create stories forthe parent record. For example, a child object of the parent type can bespecified for tracking, and certain fields of the child object can bespecified for tracking. As another example, if the child object is of atype specified for tracking, then a tracked change for the child objectis propagated to parent records of the child object.

In step 340, the story is added to a feed for the first record. In oneembodiment, adding the story to a feed can include adding events to atable (which may be specific to a record or be for all or a group ofobjects), where a display version of a story can be performeddynamically when a user requests a feed for the first record. In anotherembodiment, a display version of a story can be added when a record feedis stored and maintained for a record. As mentioned above, a feed may bemaintained for only certain records. In one implementation, the feed ofa record can be stored in the database associated with the feed. Forexample, the feed can be stored as a field (e.g. as a child object) ofthe record. Such a field can store a pointer to the text to be displayedfor the story.

In some embodiments, only the current story (or other current feed item)may be kept or temporarily stored, e.g., in some temporary memorystructure. For example, a story for only a most recent change to anyparticular field is kept. In other embodiments, many previous storiesmay be kept in the feed. A time and/or date for each story can betracked. Herein, a feed of a record is also referred to as an entityfeed, as a record is an instance of a particular entity object of thedatabase.

In step 350, followers of the first record can be identified. A followeris a user following (subscribing to a feed) of the first record. In oneembodiment, when a user requests a feed of a particular record such anidentification need not be done. In another embodiment where a recordfeed is pushed to a user (e.g. as part of a news feed), then the usercan be identified as a follower of the first record. Accordingly, thisstep can be the identification of records and other objects beingfollowed by a particular user.

In one embodiment, the database system can store a list of the followersfor a particular record. In various implementations, the list can bestored with the first record or associated with the record using anidentifier (e.g. a pointer) to retrieve the list. For example, the listcan be stored in a field of the first record. In another embodiment, alist of the records that a user is following is used. In oneimplementation, the database system can have a routine that runs foreach user, where the routine polls the records in the list to determineif a new story has been added to a feed of the record. In anotherimplementation, the routine for the user can be running at leastpartially on a user device, which contacts the database to perform thepolling.

In step 360, the story is added to a feed of each follower. In oneembodiment, the story is pushed to the feed of a user, e.g., by aroutine that determines the followers for the record from a listassociated with the record. In another embodiment, the story is pulledto a feed, e.g., by a user device. This pulling may occur when a userrequests the feed, as occurs in step 370. Thus, these actions may occurin a different order. The creation of the feed for a pull may be adynamic creation that identifies records being followed by therequesting user, generates the display version of relevant stories fromstored information (e.g. event and field change), and adds the storiesinto the feed. A feed of stories of records and other objects that auser is following is also called a news feed.

In yet another embodiment, the story could be sent as an e-mail to thefollower, instead of in a feed. In one implementation, e-mail alerts forevents can enable people to be e-mailed when certain events occur. Inanother implementation, e-mails can be sent when there are posts on auser profile and posts on entities to which the user subscribes. In oneimplementation, a user can turn on/off email alerts for all or someevents. In an embodiment, a user can specify what kind of stories toreceive about a record that the user is following. For example, a usercan choose to only receive stories about certain fields of a record thatthe user is following, and potentially about what kind of update wasperformed (e.g. a new value input into a specified field, or thecreation of a new field).

In step 370, a follower can access his/her news feed to see the story.In one embodiment, the user has just one news feed for all of therecords that the user is following. In one aspect, a user can accesshis/her own feed by selecting a particular tab or other object on a pageof an interface to the database system. Once selected the feed can beprovided as a list, e.g., with an identifier (e.g. a time) or includingsome or all of the text of the story. In another embodiment, the usercan specify how the stories are to be displayed and/or sent to the user.For example, a user can specify a font for the text, a location of wherethe feed can be selected and displayed, amount of text to be displayed,and other text or symbols to be displayed (e.g. importance flags).

FIG. 4 is a block diagram 400 of components of a database systemperforming a method for tracking an update to a record according toembodiments. Block diagram 400 can perform embodiments of method 300, aswell as embodiments of other method described herein.

A first user 405 sends a request 1 to update record 425 in databasesystem 416. Although an update request is described, other events thatare being tracked are equally applicable. In various embodiments, therequest 1 can be sent via a user interface (e.g. 30 of FIG. 2) or anapplication program interface (e.g. API 32). An I/O port 420 canaccommodate the signals of request 1 via any input interface, and sendthe signals to one or more processors 417. The processor 417 can analyzethe request and determine actions to be performed. Herein, any referenceto a processor 417 can refer to a specific processor or any set ofprocessors in database system 416, which can be collectively referred toas processor 417.

Processor 417 can determine an identifier for record 425, and sendcommands 2 with the new data to record database 412 to update record425. In one embodiment, record database 412 is where tenant data 112 isstored. The request 1 and new data commands 2 can be encapsulated in asingle write transaction sent to record database 412. In one embodiment,multiple changes to records in the database can be made in a singlewrite transaction.

Processor 417 can also analyze request 1 to determine whether a story isto be created, which at this point may include determining whether theevent (e.g. a change to a particular field) is to be tracked. Thisdetermination can be based on an interaction (i.e. an exchange of data)with record database 412 and/or other databases, or based on informationstored locally (e.g. in cache or RAM) at processor 417. In oneembodiment, a list of record types that are being tracked can be stored.The list may be different for each tenant, e.g. as each tenant mayconfigure the database system to their own specifications. Thus, if therecord 425 is of a type not being tracked, then the determination ofwhether to create a story can stop there.

The same list or a second list (which can be stored in a same locationor a different location) can also include the fields and/or events thatare tracked for the record types in the first list. This list can besearched to determine if the event is being tracked. A list may alsocontain information having the granularity of listing specific recordsthat are to be tracked (e.g. if a tenant can specify the particularrecords to be tracked, as opposed to just type).

As an example, processor 417 may obtain an identifier associated withrecord 425 (e.g. obtained from request 1 or database 412), potentiallyalong with a tenant identifier, and cross-reference the identifier witha list of records for which stories are to be created. Specifically, therecord identifier can be used to determine the record type and a list oftracked types can be searched for a match. The specific record may alsobe checked if such individual record tracking was enabled. The name ofthe field to be changed can also be used to search a list oftracking-enabled fields. Other criteria besides field and events can beused to determine whether a story is created, e.g., type of change inthe field. If a story is to be generated, processor 417 can thengenerate the story.

In some embodiments, a story is created dynamically when a feed (e.g.the entity feed of record 425) is requested. Thus, in oneimplementation, a story can be created when a user requests the entityfeed for record 425. In this embodiment, the story may be created (e.g.assembled), including re-created, each time the entity feed is to bedisplayed to any user. In one implementation, one or more history tablescan keep track of previous events so that the story can be re-created.

In another embodiment, a story can be created at the time the eventoccurs, and the story can be added to a list of feed items. The list offeed items may be specific to record 425, or may be an aggregate of feeditems including feed items for many records. Such an aggregate list caninclude a record identifier so that the feed items for the entity feedof record 425 can be easily retrieved. For example, after the story hasbeen generated, processor 417 can add the new story 3 to a feed ofrecord 425. As mentioned above, in one embodiment, the feed can bestored in a field (e.g. as a child object) of record 425. In anotherembodiment, the feed can be stored in another location or in anotherdatabase, but with a link (e.g. a connecting identifier) to record 425.The feed can be organized in various ways, e.g., as a linked list, anarray, or other data structure.

A second user 430 can access the new story 3 in various ways. In oneembodiment, second user 430 can send a request 4 for the record feed.For example, second user 430 can access a home page (detail page) of therecord 425 (e.g. with a query or by browsing), and the feed can beobtained through a tab, button, or other activation object on the page.The feed can be displayed on the screen or downloaded.

In another embodiment, processor 417 can add the new story in a step 5to a feed (e.g. a news feed) of a user that is following record 425. Inone implementation, processor 417 can determine each of the followers ofrecord 425 by accessing a list of the users that have been registered asfollowers. This determination can be done for each new event (e.g.update 1). In another implementation, processor 417 can poll (e.g. witha query) the records that second user 430 is following to determine whennew stories (or other feed items) are available. Processor 417 can use afollower profile 435 of second user 430, which can contain a list of therecords that the second user 430 is following. Such a list can becontained in other parts of the database as well. Second user 430 canthen send a request 6 to his/her profile 435 to obtain a feed, whichcontains the new story. The user's profile 435 can be stored in aprofile database 414, which can be the same or different than database412.

In some embodiments, a user can define a news feed to include newstories from various records, which may be limited to a maximum number.In one embodiment, each user has one news feed. In another embodiment,the follower profile 435 can include the specifications of each of therecords to be followed (with the criteria for what stories are to beprovided and how they are displayed), as well as the feed.

Some embodiments can provide various types of record feeds. Entity Feedscan exist for records, e.g., of type Account, Opportunity, Case, andContact. An entity feed can tell a user about the actions that peoplehave taken on that particular record or on one its related records. Theentity feed can include who made the action, which field was changed,and the old and new values. In one embodiment, entity feeds can exist onall supported records as a list that is linked to the specific record.For example, a feed could be stored in a field that allows lists (e glinked lists) or as a child object.

IV. Tracking Actions of a User

In addition to knowing about events associated with a particular record,it can be helpful for a user to know what a particular user is doing. Inparticular, it might be nice to know what the user is doing without theuser having to generate the story (e.g. a user submitting a synopsis ofwhat the user has done). Accordingly, embodiments can automaticallytrack actions of a user that trigger events, and stories can begenerated for certain events.

FIG. 5 is a flowchart of a method 500 for tracking actions of a user ofa database system according to embodiments. Method 500 may be performedin addition to method 300. The methods of implementing method 300,including order of steps, can also be applied to method 500 and othermethods described herein. Thus, a feed can be composed of changes to arecord and actions of users.

In step 510, a database system (e.g. 16) identifies an action of a firstuser. In one embodiment, the action triggers an event, and the event isidentified. For example, the action of a user requesting an update to arecord can be identified, where the event is receiving a request or isthe resulting update of a record. The action may thus be defined by theresulting event. In another embodiment, only certain types of actions(events) are identified. Which actions are identified can be set as adefault or can be configurable by a tenant, or even configurable at auser level. In this way, processing effort can be reduced since onlysome actions are identified.

In step 520, it is determined whether the event qualifies for a story.In one embodiment, a predefined list of events (e.g. as mentionedherein) can be created so that only certain actions are identified. Inone embodiment, an administrator (or other user) of a tenant can specifythe type of actions (events) for which a story is to be generated. Thisstep may also be performed for method 300.

In step 530, a story is generated about the action. In an example wherethe action is an update of a record, the story can be similar or thesame as the story created for the record. The description can be alteredthough to focus on the user as opposed to the record. For example, “JohnD. has closed a new opportunity for account XYZ” as opposed to “anopportunity has been closed for account XYZ.”

In step 540, the story is added to a profile feed of the first user. Inone embodiment, a feed for a particular user can be accessed on a pageof the user's profile, in a similar manner as a record feed can beaccessed on a detail page of the record. In another embodiment, thefirst user may not have a profile feed and the story may just be storedtemporarily before proceeding. A profile feed of a user can be storedassociated with the user's profile. This profile feed can be added to anews feed of another user.

In step 550, followers of the first user are identified. In oneembodiment, a user can specify which type of actions other users canfollow. Similarly, in one implementation, a follower can select whatactions by a user the follower wants to follow. In an embodiment wheredifferent followers follow different types of actions, which users arefollowers of that user and the particular action can be identified,e.g., using various lists that track what actions and criteria are beingfollowed by a particular user. In various embodiments, the followers ofthe first user can be identified in a similar manner as followers of arecord, as described above for step 350.

In step 560, the story is added to a news feed of each follower of thefirst user. The story can be added in a similar manner as the feed itemsfor a record feed. The news feed can contain stories both about usersand records. In another embodiment, a user can specify what kind ofstories to receive about a user that the user is following. For example,a user could specify stories with particular keywords, of certain typesof records, of records owned or created by certain users, particularfields, and other criteria as mentioned herein.

In step 570, a follower accesses the news feed and sees the story. Inone embodiment, the user has just one news feed for all of the recordsthat the user is following. In another embodiment, a user can accesshis/her own feed (i.e. feed about his/her own actions) by selecting aparticular tab or other object on a page of an interface to the databasesystem. Thus, a feed can include stories about what other users aredoing in the database system. When a user becomes aware of a relevantaction of another user, the user can contact the co-worker, therebyfostering teamwork.

V. Generation of a Story

As described above, some embodiments can generate text describing events(e.g. updates) that have occurred for a record and actions by a userthat trigger an event. A database system can be configured to generatethe stories for various events in various ways.

A. Which Events to Generate a Story for

In a database system, there are various events that can be detected.However, the operator of the database system and/or a tenant may notwant to detect every possible event as this could be costly with regardsto performance. Accordingly, the operator and/or the tenant canconfigure the database system to only detect certain events. Forexample, an update of a record may be an event that is to be detected.

Out of the events that are detected, a tenant (including a specific userof the tenant) may not want a story about each detected event. Forexample, all updates to a record may be identified at a first level.Then, based on specifications of an administrator and/or a specific userof a tenant, another level of inquiry can be made as to whether a storyis to be generated about the detected event. For example, the eventsthat qualify for a story can be restricted to changes for only certainfields of the record, which can differ depending on which user isreceiving the feed. In one embodiment, a database system can trackwhether an event qualifies for a story for any user, and once the storyis generated, it can be determined who is to receive the story.

Supported events (events for which a story is generated) can includeactions for standard fields, custom fields, and standard related lists.Regarding standard fields, for the entity feed and the profile feed, astandard field update can trigger a story to be published to that feed.In one embodiment, which standard field can create a story can be set byan administrator to be the same for every user. In another embodiment, auser can set which standard fields create a story for that user's newsfeed. Custom fields can be treated the same or differently than standardfields.

The generation of a feed item can also depend on a relationship of anobject to other objects (e.g. parent-child relationships). For example,if a child object is updated, a story may be written to a feed of aparent of the child object. The level of relationship can be configured,e.g., only 1 level of separation (i.e. no grandparent-grandchildrelationship). Also, in one embodiment, a story is generated only forobjects above the objects being updated, i.e., a story is not writtenfor a child when the parent is updated.

In some embodiments, for related lists of a record, a story is writtento its parent record (1 level only) when the related list item is added,and not when the list item is changed or deleted. For example: user Aadded a new opportunity XYZ for account ABC. In this manner, entityfeeds can be controlled so as not to be cluttered with stories aboutchanges to their related items. Any changes to the related list item canbe tracked on their own entity feed, if that related list item has afeed on it. In this embodiment, if a user wants to see a feed of therelated list item then the user can subscribe to it. Such a subscriptionmight be when a user cares about a specific opportunity related to aspecific account. A user can also browse to that object's entity feed.Other embodiments can create a story when a related entity is changed ordeleted.

In one embodiment, an administrator (of the system or of a specifictenant) can define which events of which related objects are to havestories written about them in a parent record. In another embodiment, auser can define which related object events to show. In oneimplementation, there are two types of related lists of related objects:first class lookup and second class lookup. Each of the records in therelated lists can have a different rule for whether a story is generatedfor a parent record. Each of these related lists can be composed ascustom related lists. In various embodiments, a custom related list canbe composed of custom objects, the lists can contain a variety ofrecords or items (e.g. not restricted to a particular type of record oritem), and can be displayed in a customized manner.

In one embodiment, a first class lookup contains records of a childrecord that can exist by itself. For example, the contacts on an accountexist as a separate record and also as a child record of the account. Inanother embodiment, a record in a first class lookup can have its ownfeed, which can be displayed on its detail page.

In one embodiment, a second class lookup can have line items existingonly in the context of their parent record (e.g. activities on anopportunity, contact roles on opportunity/contact). In oneimplementation, the line items are not objects themselves, and thusthere is no detail page, and no place to put a feed. In anotherimplementation, a change in a second class lookup can be reported on thefeed of the parent.

Some embodiments can also create stories for dependent field changes. Adependent field change is a field that changes value when another fieldchanges, and thus the field has a value that is dependent on the valueof the other field. For example, a dependent field might be a sum (orother formula) that totals values in other fields, and thus thedependent field would change when one of the fields being summedchanges. Accordingly, in one embodiment, a change in one field couldcreate stories for multiple fields. In other embodiments, stories arenot created for dependent fields.

B. How the Story is Generated

After it is determined that a story is going to be generated, someembodiments can also determine how the story is generated. In oneembodiment, different methods can be used for different events, e.g., ina similar fashion as for the configurability of which events stories aregenerated. A story can also include a description of multiple events(e.g. john changed the account status and amount).

In one embodiment, the story is a grammatical sentence, thereby beingeasily understandable by a person. In another embodiment, the storyprovides detailed information about the update. In various examples, anold value and new value for a field may be included in the story, anaction for the update may be provided (e.g. submitted for approval), andthe names of particular users that are responsible for replying oracting on the story may be also provided. The story can also have alevel of importance based on settings chosen by the administrator, aparticular user requesting an update, or by a following user who is toreceive the story, which fields is updated, a percentage of the changein a field, the type of event, or any combination of these factors.

The system may have a set of heuristics for creating a story from theevent (e.g. a request to update). For example, the subject may be theuser, the record, or a field being added or changed. The verb can bebased on the action requested by the user, which can be selected from alist of verbs (which may be provided as defaults or input by anadministrator of a tenant). In one embodiment, stories can be genericcontainers with formatting restrictions,

As an example of a creation of a New record” “Mark Abramowitz created anew Opportunity IBM-20,000 laptops with Amount as $3.5M and SamPalmisano as Decision Maker.” This event can be posted to the profilefeed for Mark Abramowitz and the entity feed for record of Opportunityfor IBM-20,000 laptops. The pattern can be given by (AgentFullName)created a new (ObjectName)(RecordName) with [(FieldName) as (FieldValue)[,/and]]*[[added/changed/removed] (RelatedListRecordName) [as/to/as](RelatedListRecordValue) [,/and]]*. Similar patterns can be formed for achanged field (standard or custom) and an added child record to arelated list.

VI. Tracking Commentary from or about a User

Some embodiments can also have a user submit text, instead of thedatabase system generating a story. As the text is submitted by users,the text (also referred generally as messages) can be about any topic.Thus, more information than just actions of a user and events of arecord can be conveyed. In one embodiment, the messages can be used toask a question about a particular record, and users following the recordcan provide responses (comments).

FIG. 6 is a flowchart of a method 600 for creating a news feed thatincludes messages associated with a first user according to embodiments.In one embodiment, method 600 can be combined with methods 300 and 500.In one aspect, a message can be associated with the first user when thefirst user creates the message (e.g. a post or comment about a record oranother user). In another aspect, a message can be associated with thefirst user when the message is about the first user (e.g. posted byanother user on the first user's profile feed).

In step 610, database system receives a message (e.g. a post or status)associated with a first user. The message (e.g. a post or status update)can contain text submitted by another user or by the first user. In oneembodiment, a post is for a section of the first user's profile whereany user can add a post, and where multiple posts can exist. Thus, apost can appear on the first user's profile and can be viewed when thefirst user's profile is visited. For a message about a record, the postcan appear on a detail page of a record. Note the message can appear inother feeds as well. In another embodiment, a status update about thefirst user can only be added by the first user. In one implementation, auser can only have one status message.

In step 620, the message is added to a profile of the first user. In oneimplementation, the message can be added to a profile feed of the firstuser, which is associated (e.g. as a related list) with the first user'sprofile. In one embodiment, the posts are listed indefinitely. Inanother embodiment, only the most recent posts (e.g. last 50) are keptin the profile feed. Such embodiments can also be employed with stories.In yet another embodiment, the message can be added to a profile of theuser adding the message.

In step 630, database system identifies followers of the first user. Inone embodiment, the database system can identify the followers asdescribed above for method 500. In various embodiments, a follower canselect to follow a feed about the actions of the first user, messagesabout the first user, or both (potentially in a same feed).

In step 640, the message is added to a news feed of each follower. Inone embodiment, the message is only added to a news feed of a particularfollower if the message matches some criteria, e.g., the messageincludes a particular keyword or other criteria. In another embodiment,a message can be deleted by the user who created the message. In oneimplementation, once deleted by the author, the message is deleted fromall feeds to which the message had been added.

In step 650, the follower accesses a news feed and sees the message. Forexample, the follower can access a news feed on the user's own profilepage. As another example, the follower can have a news feed sent tohis/her own desktop without having to first go to a home page.

In step 660, database system receives a comment about the message. Thedatabase system can add the comment to a feed of the same first user,much as the original message was added. In one embodiment, the commentcan also be added to a feed of the user adding the comment. In oneimplementation, users can also reply to the comment. In anotherembodiment, users can add comments to a story, and further comments canbe associated with the story. In yet another embodiment, making acomment or message is not an action to which a story is created. Thus,the message may be the only feed item created from such an action.

In one implementation, if a story (or post) is deleted, itscorresponding comments are deleted as well. In another embodiment, newcomments on a story (or post) do not update the story timestamp. Also,the story or post can continue to be shown in a feed (profile feed,record feed, or news feed) if it has had a comment within a specifiedtimeframe (e.g. within the last week). Otherwise, the story (post) canbe removed in an embodiment.

In some embodiments, all or most stories can be commented on. In otherembodiments, stories for certain records (e.g. cases or ideas) are notcommentable. In various embodiments, comments can be made for any one ormore records of opportunities, accounts, contacts, leads, and customobjects.

In step 670, the comment is added to a news feed of each follower. Inone embodiment, a user can make the comment within the user's news feed.Such a comment can propagate to the appropriate profile feed or recordfeed, and then to the news feeds of the following users. Thus, feeds caninclude what people are saying, as well as what they are doing. In oneaspect, feeds are a way to stay up-to-date (e.g. on users,opportunities, etc.) as well as an opportunity to reach out to yourco-workers/partners and engage them around common goals.

In some embodiments, users can rate stories or messages (includingcomments). A user can choose to prioritize a display of a feed so thathigher rated feed items show up higher on a display. For example, in anembodiment where comments are answers to a specific question, users canrate the different status posts so that a best answer can be identified.As another example, users are able to quickly identify feed items thatare most important as those feed items can be displayed at a top of alist. The order of the feed items can be based on an importance level(which can be determined by the database system using various factors,some of which are mentioned herein) and based on a rating from users. Inone embodiment, the rating is on a scale that includes at least 3values. In another embodiment, the rating is based on a binary scale.

Besides a profile for a user, a group can also be created. In variousembodiments, the group can be created based on certain criteria that arecommon to the users, can be created by inviting users, or can be createdby receiving requests to join from a user. In one embodiment, a groupfeed can be created, with messages being added to the group feed whensomeone adds a message to the group as a whole. For example, a grouppage may have a section for posts. In another embodiment, a message canbe added to a group feed when a message is added about any one of themembers. In yet another embodiment, a group feed can include storiesabout actions of the group as a whole (e.g. when an administratorchanges data in a group profile or a record owned by the group), orabout actions of an individual member.

FIG. 7 shows an example of a group feed on a group page according toembodiments. As shown, a feed item 710 shows that a user has posted adocument to the group object. The text “Bill Bauer has posted thedocument Competitive Insights” can be generated by the database systemin a similar manner as stories about a record being changed. A feed item720 shows a post to the group, along with comments 730.

FIG. 8 shows an example of a record feed containing a story, post, andcomments according to embodiments. Feed item 810 shows a story based onthe event of submitting a discount for approval. Other feed items showposts that are made to the record and comments that are made on theposts.

VII. Infrastructure for a Feed

A. Tables Used to Create a Feed

FIG. 9A shows a plurality of tables that may be used in tracking eventsand creating feeds according to embodiments. The tables of FIG. 9A mayhave entries added, or potentially removed, as part of tracking eventsin the database from which feed items are creates or that correspond tofeed items. In one embodiment, each tenant has its own set of tablesthat are created based on criteria provided by the tenant.

An event history table 910 can provide a history of events from whichfeed items are created. In one aspect, the events are for objects thatare being tracked. Thus, table 910 can store change histories for feeds,and the changes can be persisted. In various embodiments, event historytable 910 can have columns of event ID 911, object ID 912 (also calledparent ID), and created by ID 913. The event ID 911 can uniquelyidentify a particular event and can start at 1 (or other number orvalue).

Each new event can be added chronologically with a new event ID, whichmay be incremented in order. An object ID 912 can be used to track whichrecord or user's profile is being changed. For example, the object IDcan correspond to the record whose field is being changed or the userwhose feed is receiving a post. The created by ID 913 can track the userwho is performing the action that results in the event, e.g., the userthat is changing the field or that is posting a message to the profileof another user.

In some other embodiments, event history table 910 can have one or moreof the following variables with certain attributes: ORGANIZATION_IDbeing CHAR(15 BYTE), FEEDS_ENTITY_HISTORY_ID being CHAR(15 BYTE),PARENT_ID being CHAR(15 BYTE), CREATED_BY being CHAR(15 BYTE),CREATED_DATE being a variable of type DATE, DIVISION being a NUMBER,KEY_PREFIX being CHAR(3 BYTE), and DELETED being CHAR(1 BYTE). Theparent ID can provide an ID of a parent object in case the change ispromulgated to the parent. The key prefix can provide a key that isunique to a group of records, e.g. custom records (objects). The deletedvariable can indicate that the feed items for the event are deleted, andthus the feed items are not generated. In one embodiment, the variablesfor each event entry or any entry in any of the tables may not benullable. In another embodiment, all entries in the event history table910 are used to create feed items for only one object, as specified bythe object ID 912. For example, one story cannot communicate updates ontwo records, such as updates of an account field and an opportunityfield.

In one embodiment, a name of an event can also be stored in table 910.In one implementation, a tenant can specify events that they wanttracked. In an embodiment, event history table 910 can include the nameof the field that changed (e.g. old and new values). In anotherembodiment, the name of the field, and the values, are stored in aseparate table. Other information about an event (e.g. text of comment,story, post or status update) can be stored in event history table 910,or in other tables, as is now described.

A field change table 920 can provide a history of the changes to thefields. The columns of table 920 can include an event ID 921 (whichcorrelates to the event ID 911), an old value 922 for the field, and thenew value 923 for the field. In one embodiment, if an event changes morethan one field value, then there can be an entry for each field changed.As shown, event ID 921 has two entries for event E37.

In some other embodiments, field change table 920 can have one or moreof the following variables with certain attributes: ORGANIZATION_IDbeing CHAR(15 BYTE), FEEDS_ENTITY_HISTORY_FIELDS_ID being CHAR(15 BYTE)and identifying each entry, FEEDS_ENTITY_HISTORY_ID being CHAR(15 BYTE),FIELD_KEY being VARCHAR2(120 BYTE), DATA_TYPE being CHAR(1 BYTE),OLDVAL_STRING VARCHAR2 being (765 BYTE), NEWVAL_STRING beingVARCHAR2(765 BYTE), OLDVAL_FIRST_NAME being VARCHAR2(765 BYTE),NEWVAL_FIRST_NAME being VARCHAR2(765 BYTE), OLDVAL_LAST_NAME beingVARCHAR2(765 BYTE), NEWVAL_LAST_NAME being VARCHAR2(765 BYTE),OLDVAL_NUMBER being NUMBER, NEWVAL_NUMBER being NUMBER, OLDVAL_DATEbeing DATE, NEWVAL_DATE being DATE, and DELETED being CHAR(1 BYTE). Inone embodiment, one or more of the variables for each entry in any ofthe tables may be nullable.

In one embodiment, the data type variable (and/or other variables) is anon-api-insertable field. In another embodiment, variable values can bederived from the record whose field is being changed. Certain values canbe transferred into typed columns old/new value string, old/new valuenumber or old/new value date depending upon the derived values. Inanother embodiment, there can exist a data type for capturingadd/deletes for child objects. The child ID can be tracked in theforeign-key column of the record. In yet another embodiment, if thefield name is pointing to a field in the parent entity, a field levelsecurity (FLS) can be used when a user attempts to a view a relevantfeed item. Herein, security levels for objects and fields are alsocalled access checks and determinations of authorization. In one aspect,the access can be for create, read, write, update, or delete of objects.

In one embodiment, the field name (or key) can be either a field name ofthe entity or one of the values in a separate list. For example, changesthat do not involve the update of an existing field (e.g. a close oropen) can have a field name specified in an enumerated list. Thisenumerated list can store “special” field name sentinel values fornon-update actions that a tenant wants to track. In one aspect, the APIjust surfaces these values and the caller has to check the enumeratedvalues to see if it is a special field name.

A comment table 930 can provide a history of the comments made regardingan event, e.g., a comment on a post or a change of a field value. Thecolumns of table 930 can include an event ID 921 (which correlates tothe event ID 911), the comment column 932 that stores the text of thecomment, and the time/date 933 of the comment. In one embodiment, therecan be multiple comments for each event. As shown, event ID 921 has twoentries for event E37.

In some other embodiments, comment table 930 can have one or more of thefollowing variables with certain attributes: ORGANIZATION_ID beingCHAR(15 BYTE), FEEDS_COMMENTS_ID being CHAR(15 BYTE) and uniquelyidentifying each comment, PARENT_ID being CHAR(15 BYTE), CREATED_BYbeing CHAR(15 BYTE), CREATED_DATE being DATE, COMMENTS beingVARCHAR2(420 BYTE), and DELETED being CHAR(1 BYTE).

A user subscription table 940 can provide a list of the objects beingfollowed (subscribed) by a user. In one embodiment, each entry has auser ID 941 of the user doing the following and one object ID 942corresponding to the object being followed. In one implementation, theobject being followed can be a record or a user. As shown, the user withID U819 is following object IDs O615 and O489. If user U819 is followingother objects, then additional entries may exist for user U819. Also asshown, user U719 is also following object O615. The user subscriptiontable 940 can be updated when a user adds or deletes an object that isbeing followed.

In some other embodiments, comment table 940 can be composed of twotables (one for records being followed and one for users beingfollowed). One table can have one or more of the following variableswith certain attributes: ORGANIZATION_ID being CHAR(15 BYTE),ENTITY_SUBSCRIPTION ID being CHAR(15 BYTE), PARENT_ID being CHAR(15BYTE), CREATED_BY being CHAR(15 BYTE), CREATED_DATE being DATE, andDELETED being CHAR(1 BYTE). Another table can have one or more of thefollowing variables with certain attributes: ORGANIZATION_ID beingCHAR(15 BYTE), USER SUBSCRIPTIONS_ID being CHAR(15 BYTE), USER_ID beingCHAR(15 BYTE), CREATED_BY being CHAR(15 BYTE), and CREATED_DATE beingDATE.

In one embodiment, regarding a profile feed and a news feed, these areread-only views on the event history table 910 specialized for thesefeed types. Conceptually the news feed can be a semi-join between theentity subscriptions table 940 and the event history table 910 on theobject IDs 912 and 942 for the user. In one aspect, these entities canhave polymorphic parents and can be subject to a number of restrictionsdetailed herein, e.g., to limit the cost of sharing checks.

In one embodiment, entity feeds are modeled in the API as a feedassociate entity (e.g. AccountFeed, CaseFeed etc). A feed associateentity includes information composed of events (e.g. event IDs) for onlyone particular record type. Such a list can limit the query (and sharingchecks) to a specific record type. In one aspect, this structuring ofthe entity feeds can make the query run faster. For example, a requestfor a feed of a particular account can include the record type ofaccount. In one implementation, an account feed table can then besearched, where the table has account record IDs and corresponding eventIDs or pointers to particular event entries in event history table 910.Since the account feed table only contains some of the records (notall), the query can run faster.

In one embodiment, there may be objects with no events listed in theevent history table 910, even though the record is being tracked. Inthis case, the database service can return a result indicating that nofeed items exist.

In another embodiment, tables can also exist for audit tracking, e.g.,to examine that operations of the system (e.g. access checks) areperforming accurately. In one embodiment, audit change-history tablescan be persisted (e.g. in bulk) synchronously in the same transaction asfeed events are added to event history table 910. In another embodiment,entries to the two sets of table can be persisted in asynchronous manner(e.g. by forking a bulk update into a separate java thread). In oneaspect, some updates to any of the tables can get lost if the instanceof the table goes down while the update has not yet finished. Thisasynchronous manner can limit an impact performance on save operations.In some embodiments, a field “persistence type” (tri state: AUDIT, FEEDSor BOTH) can be added to capture user preferences, as opposed to beinghardcoded.

B. FeedItem

A feed item can represent an individual field change of a record,creation and deletion of a record, or other events being tracked for arecord or a user. In one embodiment, all of the feed items in a singletransaction (event) can be grouped together and have the same event ID.A single transaction relates to the operations that can be performed ina single communication with the database. In another embodiment where afeed is an object of the database, a feed item can be a child of aprofile feed, news feed, or entity feed. If a feed item is added tomultiple feeds, the feed item can be replicated as a child of each feedto which the feed item is added.

In one implementation, a feed item is visible only when its parent feedis visible, which can be the same as needing read access on the feed'sparent (which can be by the type of record or by a specific record). Thefeed item's field may be only visible when allowed under field-levelsecurity (FLS). Unfortunately, this can mean that the parent feed may bevisible, but the child may not be because of FLS. Such access rules aredescribed in more detail below. In one embodiment, a feed item can beread-only. In this embodiment, after being created, the feed item cannotbe changed.

In multi-currency organizations, a feed item can have an extra currencycode field. This field can give the currency code for the currency valuein this field. In one aspect, the value is undefined when the data typeis anything other than currency.

C. FeedComment

In some embodiments, a comment exists as an item that depends fromstories, posts, status updates, and other items that are independent ofeach other. Thus, a feed comment object can exist as a child object of afeed item object. For example, comment table 930 can be considered achild table of event history table 910. In one embodiment, a feedcomment can be a child of a profile feed, news feed, or entity feed thatis separate from other feed items.

In various embodiments, a feed comment can have various permissions forthe following actions. For read permission, a feed comment can bevisible if the parent feed is visible. For create permission, if a userhas access to the feed (which can be tracked by the ID of the parentfeed), the user can add a comment. For delete, only a user with modifyall data permission or a user who added the comment can delete thecomment. Also delete permission can require access on the parent feed.An update of a comment can be restricted, and thus not be allowed.

In one embodiment, regarding a query restriction, a feed comment cannotbe queried directly, but can be queried only via the parent feed. Anexample is “select id, parentid, (select . . . from feedcomment) fromentityfeed”. In another embodiment, a feed comment can be directlyqueries, e.g., by querying comment table 930. A query could include thetext of a comment or any other column of the table.

In another embodiment, regarding soft delete behavior, a feed commenttable does not have a soft delete column. A soft delete allows anundelete action. In one implementation, a record can have a soft delete.Thus, when the record is deleted, the feed (and its children) can besoft deleted. Therefore, in one aspect, a feed comment cannot beretrieved via the “query” verb (which would retrieve only the comment),but can be retrieved via “queryAll” verb though. An example isqueryAll(“select id, (select id, commentbody from feedcomments) fromaccountfeed where parentid=‘001x000xxx3MkADAA0’”);//where‘001x000xxx3MkADAA0’ has been soft deleted. When a hard delete (aphysical delete) happens, the comment can be hard deleted from thedatabase.

In one embodiment, regarding an implicit delete, feeds with comments arenot deleted by a reaper (a routine that performs deletion). In anotherembodiment, a user cannot delete a feed. In yet another embodiment, uponlead convert (e.g. to an opportunity or contact), the feed items of thelead can be hard deleted. This embodiment can be configured to performsuch a deletion for any change in record type. In variousimplementations, only the comments are hard deleted upon a lead convert,other convert, or when the object is deleted (as mentioned above).

In one embodiment, viewing a feed pulls up the most recent messages orstories (e.g. 25) and searches the most recent (e.g. 4) comments foreach feed item. The comments can be identified via the comment table930. In one implementation, a user can request to see more comments,e.g., by selecting a see more link.

In some embodiments, user feeds and/or entity feeds have a last commentdate field. In various embodiments, the last comment date field isstored as a field of a record or a user profile. For feeds with nocomments, this can be the same as the created date. Whenever a newcomment is created, the associated feed's last comment date can beupdated with the created date of the comment. The last comment date isunchanged if a feed comment is deleted. A use case is to allow people toorder their queries to see the feeds which have been most recentlycommented on.

D. Creating Custom Feeds by Customizing the Event History Table

In some embodiments, a tenant (e.g. through an administrator) or aspecific user of a tenant can specify the types of events for which feeditems are created. A user can add more events or remove events from alist of events that get added to the event history table 910. In oneembodiment, a trigger can be added as a piece of code, rule, or item ona list for adding a custom event to the event history table 910. Thesecustom events can provide customers the ability to create their owncustom feeds and custom feed items to augment or replace implicitlygenerated feeds via event history table 910. Implicitly generated feeddata can be created when feed-tracking is enabled for certainentities/field-names. In one embodiment, in order to override implicitfeeds, feed tracking can be turned off and then triggers can be definedby the user to add events to the event history table 910. In otherembodiments, users are not allowed to override the default list ofevents that are added to table 910, and thus cannot define their owntriggers for having events tracked.

For example, upon lead convert or case close, a default action to betaken by the system may be to add multiple events to event history table910. If a customer (e.g. a tenant or a specific user) does not want eachof these events to show up as feed items, the customer can turn offtracking for the entities and generate custom feeds by definingcustomized triggers (e.g. by using an API) upon the events. As anotherexample, although data is not changed, a customer may still want totrack an action on a record (e.g. status changes if not already beingtracked, views by certain people, retrieval of data, etc.).

In one embodiment, if a user does not want a feed item to be generatedupon every change on a given field, but only if the change exceeds acertain threshold or range, then such custom feeds can be conditionallygenerated with the customized triggers. In one implementation, thedefault tracking for the record or user may be turned off for thiscustomization so that the events are only conditionally tracked. Inanother implementation, a trigger can be defined that deletes eventsthat are not desired, so that default tracking can still be turned onfor a particular object type. Such conditional tracking can be used forother events as well.

In some embodiments, defining triggers to track certain events can bedone as follows. A user can define an object type to track. This objecttype can be added to a list of objects that can be tracked for aparticular tenant. The tenant can remove object types from this list aswell. Custom objects and standard objects can be on the list, which may,for example, be stored in cache or RAM of a server or in the database.Generally only one such list exists for a tenant, and users do not haveindividual lists for themselves, although in some embodiments, they mayparticularly when the number of users in a tenant is small.

In one embodiment, a tenant can select which records of an object typeare to be tracked. In another embodiment, once an object type is addedto the tracking list of object types, then all records of that type aretracked. The tenant can then specify the particulars of how the trackingis to be performed. For example, the tenant can specify triggers asdescribed above, fields to be tracked, or any of the customizationsmentioned herein.

In some embodiments, when a feed is defined as an object in the database(e.g. as a child object of entity records that can be tracked), aparticular instance of the feed object (e.g. for a particular record)can be create-able and delete-able. In one embodiment, if a user hasaccess to a record then the user can customize the feed for the record.In one embodiment, a record may be locked to prevent customization ofits feed.

One method of creating a custom feed for users of a database systemaccording to embodiments is now described. Any of the following stepscan be performed wholly or partially with the database system, and inparticular by one or more processor of the database system.

In step A, one or more criteria specifying which events are to betracked for possible inclusion into a feed to be displayed are receivedfrom a tenant. In step B, data indicative of an event is received. Instep C, the event is analyzed to determine if the criteria aresatisfied. In step D, if the criteria are satisfied, at least a portionof the data is added to a table (e.g. one or more of the tables in FIG.9A) that tracks events for inclusion into at least one feed for a userof the tenant. The feed in which feed items of an event may ultimatelybe displayed can be a news feed, record feed, or a profile feed.

E. Creating Custom Feeds with Filtering

After feed items have been generated, they can be filtered so that onlycertain feed items are displayed, which may be tailored to a specifictenant and/or user. In one embodiment, a user can specify changes to afield that meet certain criteria for the feed item to show up in a feeddisplayed to the user, e.g., a newsfeed or even an entity feed displayeddirectly to the user. In one implementation, the criteria can becombined with other factors (e.g. number of feed items in the feed) todetermine which feed items to display. For instance, if a small numberof feed items exist (e.g. below a threshold), then all of the feed itemsmay be displayed.

In one embodiment, a user can specify the criteria via a query on thefeed items in his/her new feed, and thus a feed may only return objectsof a certain type, certain types of events, stories about certainfields, and other criteria mentioned herein. Messages can also befiltered according to some criteria, which may be specified in a query.Such an added query can be added onto a standard query that is used tocreate the newsfeed for a user. A first user could specify the users andrecords that the first user is following in this manner, as well asidentify the specific feed items that the first user wants to follow.The query could be created through a graphical interface or added by auser directly in a query language. Other criteria could includereceiving only posts directed to a particular user or record, as opposedto other feed items.

In one embodiment, the filters can be run by defining code triggers,which run when an event, specific or otherwise, occurs. The triggercould then run to perform the filtering at the time the event occurs orwhen a user (who has certain defined triggers, that is configured for aparticular user) requests a display of the feed. A trigger could searchfor certain terms (e.g. vulgar language) and then remove such terms ornot create the feed item. A trigger can also be used to send the feeditem to a particular person (e.g. an administrator) who does notnormally receive the feed item were it not for the feed item containingthe flagged terms.

F. Access Checks

In one embodiment, a user can access a feed of a record if the user canaccess the record. The security rules for determining whether a user hasaccess to a record can be performed in a variety of ways, some of whichare described in U.S. patent application Ser. No. 11/866,184. Forexample, a security level table can specify whether a user can see aparticular type of record and/or particular records. In oneimplementation, a hierarchy of positions within a tenant is used. Forexample, a manager can inherit the access levels of employees that themanager supervises. Field level security (FLS) can also be used todetermine whether a particular story about an update to a field can beseen by the user. The field change table 920 can be used to identify afield name or field ID, and then whether the user has read access tothat field can be determined from an FLS table. For example, if a usercould not see a field of a social security number, the feed of the userprovided to the user would not include any feed items related to thesocial security number field.

In one embodiment, a user can edit a feed of a record if the user hasaccess to the record, e.g., deleting or editing a feed item. In anotherembodiment, a user (besides an administrator) cannot edit a feed item,except for performing an action from which a feed item can be created.In one implementation, a user is required to have access to a particularrecord and field for a feed item to be created based on an action of theuser. In this case, an administrator can be considered to be a user withMODIFY-ALL-DATA security level. In yet another embodiment, a user whocreated the record can edit the feed.

G. Posts

In one embodiment, the text of posts are stored in a child table (posttable 950), which can be cross-referenced with event history table 910.Post table 950 can include event ID 951 (to cross-reference with eventID 911), post text 952 to store the text of the post, and time/date 953.An entry in post table 950 can be considered a feed post object. Postsfor a record can also be subject to access checks. In oneimplementation, if a user can view a record then all of the posts can beseen, i.e. there is not an additional level of security check as thereis for FLS. In another implementation, an additional security checkcould be done, e.g., by checking on whether certain keywords (orphrases) exist in the post. For instance, a post may not be not providedto specified users if a certain keyword exists, or only provided tospecified users if a keyword exists. In another embodiment, a table canexist for status updates.

VIII. Subscribing to Users and Records to Follow

As described above, a user can follow users, groups, and records.Embodiments can provide mechanisms for a user to manage which users,groups, and records that the user is currently following. In oneembodiment, a user can be limited to the number of users and records(collectively or separately) that the user can follow. For example, auser may be restricted to only following 10 users and 15 records, or asanother example, 25 total. Alternatively, the user may be permitted tofollow more or less users.

In one embodiment, a user can go to a page of a record and then selectto follow that object (e.g., with a button marked “follow” or “join”).In another embodiment, a user can search for a record and have thematching records show up in a list. The search can include criteria ofrecords that the user might want to follow. Such criteria can includethe owner, the creation date, last comment date, and numerical values ofparticular fields (e.g. an opportunity with a value of more than$10,000).

A follow button (or other activation object) can then reside next toeach record in the resulting list, and the follow button can be selectedto start following the record. Similarly, a user can go to a profilepage of a user and select to follow the user, or a search for users canprovide a list, where one or more users can be selected for followingfrom the list. The selections of subscribing and unsubscribing can addand delete rows in table 920.

In some embodiments, a subscription center acts as a centralized placein a database application (e.g. application platform 18) to manage whichrecords a user subscribes to, and which field updates the user wants tosee in stories. The subscription center can use a subscription table tokeep track of the subscriptions of various users. In one embodiment, thesubscription center shows a list of all the items (users and records) auser is subscribed to. In another embodiment, a user can unsubscribe tosubscribed objects from the subscription center.

A. Automatic Subscription

In one embodiment, an automatic subscription feature can ensure that auser is receiving certain feeds. In this manner, a user does not have toactively select certain objects to follow. Also, a tenant can ensurethat a user is following objects that the user needs to be following.

In various embodiments for automatically following users, a default forsmall organizations can be to follow everyone. For big organizations,the default can be to follow a manager and peers. If a user is amanager, the default can be to follow the manager's supervisor, peers,and people that the manager supervises (subordinates). In otherembodiments for automatically following records, records that the userowns may be automatically followed and/or records recently viewed (orchanged) may be automatically followed.

In one example, a new record is created. The owner (not necessarily theuser who created the entity) is subscribed to the entity. If ownershipis changed, the new owner may automatically be subscribed to follow theentity. Also, after a lead convert, the user doing the lead convert maybe automatically subscribed to the new account, opportunity, or contactresulting from the lead convert. In one implementation, the autosubscription is controlled by user preference. That is a user or tenantcan have the auto subscribe feature enabled or not. In one aspect, thedefault is to have the auto-subscribe turned on.

FIG. 9B shows a flowchart illustrating a method 900 for automaticallysubscribing a user to an object in a database system according toembodiments. Any of the following steps can be performed wholly orpartially with the database system, and in particular by one or moreprocessor of the database system.

In step 901, one or more properties of an object stored in the databasesystem are received. The properties can be received from administratorsof the database system, or from users of the database system (which maybe an administrator of a customer organization). The properties can berecords or users, and can include any of the fields of the object thatare stored in the database system. Examples of properties of a recordinclude: an owner of the record, a user that converted the record fromone record type to another record type, whether the first user hasviewed the record, and a time the first user viewed the record. Examplesof properties of a user include: which organization (tenant) the user isassociated with, the second user's position in the same organization,and which other users the user had e-mailed or worked with on projects.

In step 902, the database system receives one or more criteria aboutwhich users are to automatically follow the object. The criteria can bereceived from administrators of the database system, or from one or moreusers of the database system. The users may be an administrator of acustomer organization, which can set tenant-wide criteria or criteriafor specific users (who may also set the criteria themselves). Examplesof the criteria can include: an owner or creator of a record is tofollow the record, subordinates of an owner or creator of a record areto follow the record, a user is to follow records recently viewed(potentially after a specific number of views), records that a user haschanged values (potentially with a date requirement), records created byothers in a same business group as the user. Examples of the criteriacan also include: a user is to follow his/her manager, the user's peers,other users in the same business group as the user, and other users thatthe user has e-mailed or worked with on a project. The criteria can bespecific to a user or group of users (e.g. users of a tenant).

In step 903, the database system determines whether the one or moreproperties of the object satisfy the one or more criteria for a firstuser. In one embodiment, this determination can occur by first obtainingthe criteria and then determining objects that satisfy the criteria. Thedetermination can occur periodically, at time of creation of an object,or at other times. If different users have different criteria, then thecriteria for a particular user or group could be searched at the sametime. Since users of different tenants normally cannot view objects ofanother tenant, certain criteria does not have to be checked. In anotherembodiment, this determination can occur by looking at certainproperties and then identifying any criteria that are met. In yetanother embodiment, the criteria and properties can be used to findusers that satisfy the criteria.

In step 904, if the criteria are satisfied, the object is associatedwith the first user. The association can be in a list that storesinformation as to what objects are being followed by the first user.User subscription table 940 is an example of such a list. In oneembodiment, the one or more criteria are satisfied if one propertysatisfies at least one criteria. Thus, if the criteria is that a userfollows his/her manager and the object is the user's manager, then thefirst user will follow the object.

In one embodiment, a user can also be automatically unsubscribed, e.g.if a certain action happens. The action could be a change in the user'sposition within the organization, e.g. a demotion or becoming acontractor. As another example, if a case gets closed, then usersfollowing the case may be automatically unsubscribed.

B. Feed and Subscription Api

In one embodiment, a feed and subscription center API can enable tenantsto provide mechanisms for tracking and creating feed items, e.g., asdescribed above for creating custom feeds by allowing users to addcustom events for tracking. For example, after some initial feed itemsare created (e.g. by administrators of the database system), outsidegroups (e.g. tenants or software providers selling software to thetenants) can ‘enable objects’ for feeds through a standard API. Thegroups can then integrate into the subscription center and the storyfeeds on their own. In one embodiment, the feed and subscription centerAPI can use a graphical user interface implemented for the default feedtracking. In one embodiment, API examples include subscribing to anentity by creating a new entity subscription object for a particularuser ID, or for all users of a tenant (e.g. user subscription table940). In one embodiment, obtaining all subscriptions for a given usercan be performed by using a query, such as “select . . . fromEntitySubscription where userid=‘ . . . ’”.

Some embodiments have restriction on non-admin users, e.g. those withoutview all data permissions (VAD). One restriction can be a limit clauseon entity subscription queries (e.g. queries on user subscription table940), e.g., where the limit of the number of operations is less than100. In one embodiment, users are not required to specify an order-by,but if an order-by is specified they can only order on fields on theentity subscription entity. In one implementation, filters on entitysubscription can likewise only specify fields on the entity subscriptionentity. In one aspect, the object ID being followed can be sorted orfiltered, but not the object name.

In one embodiment, one or more restrictions can also be placed on theidentification of feed items in a feed that a user can access. Forexample, if a low-level user (i.e. user can access few objects) isattempting to see a profile feed of a high level user, a maximum numberof checks (e.g. 500) for access rights may be allowed. Such arestriction can minimize a cost of a feed request. In some embodiments,there are restriction on the type of queries (e.g. fields for filtering)allowed to construct on feeds (e.g. on tables in FIG. 9A).

C. Sharing

As mentioned above, users may be restricted from seeing records fromother tenants, as well as certain records from the tenant to which theuser belongs (e.g. the user's employer). Sharing rules can refer to theaccess rules that restrict a user from seeing records that the user isnot authorized to see or access. Additionally, in one implementation, auser may be restricted to only seeing certain fields of a record,field-level security (FLS).

In an embodiment, access rule checks are done upon subscription. Forexample, a user is not allowed to subscribe to a record or type ofrecord that the user cannot access. In one aspect, this can minimize(but not necessarily eliminate) cases where a user subscribes toentities they cannot access. Such cases can slow down news feed queries,when an access check is performed (which can end up removing much of thefeed items). Thus, a minimization of access checks can speed upoperation. In another embodiment, when feed items are createddynamically, access rule checks may be done dynamically at the time ofsubsequent access, and not upon subscription or in addition to at timeof subscription.

An example case where access checks are still performed is when a firstuser follows a second user, but the second user performs some actions onrecords or is following records that the first user is not allowed tosee. The first user may be allowed to follow the second user, and thusthe subscription is valid even though the first user may not be able tosee all of the feed items. Before a story is provided to a news feed ofthe first user, a security check may be performed to validate whetherthe first user has access rights to the feed item. If not, the feed itemis not displayed to the first user. In one implementation, users can beblocked from feed items that contain certain terms, symbols, accountnumbers, etc. In one embodiment, any user can follow another user. Inanother embodiment, users may be restricted as to which users, objects,and/or records he/she can follow.

Regarding viewing privileges of a feed, in one embodiment, a user canalways see all of his own subscriptions (even if he's lost read accessto a record). For example, a user can become a contractor, and then theuser may lose access to some records. But, the user may still see thathe/she is following the object. This can help if there is a limit to thenumber of objects that can be followed. To unsubscribe a user may needto know what they are following so they can unsubscribe and subscribe toobjects the user can see. In another embodiment, for access to otherpeople's subscriptions, a user can be required to need read-access onthe record-id to see the subscription. In some embodiments, users withauthorization to modify all data can create/delete any subscription. Inother embodiments, a user can create/delete subscriptions only for thatuser, and not anyone else.

D. Configuration of which Field to Follow

There can be various feed settings for which feed items get added toprofile and record feeds, and which get added to news feeds. In oneembodiment, for profile feeds and entity feeds, stories can be writtenfor all standard and custom fields on the supported objects. In oneimplementation, feed settings can be set to limit how many and whichfields of a record are tracked for determining whether a story is to begenerated. For example, a user or administrator can choose specificfields to track and/or certain ones not to track. In another embodiment,there is a separate limit for the number of trackable fields (e.g. 20)for a record. Thus, only certain changes may be tracked in an entityhistory and show up in the feed. In yet another embodiment, defaultfields may be chosen for tracking, where the defaults can be exposed inthe subscriptions center.

IX. Adding Items to a Feed

As described above, a feed includes feed items, which include storiesand messages, as defined herein. Various feeds can be generated. Forexample, a feed can be generated about a record or about a user. Then,users can view these feeds. A user can separately view a feed of arecord or user, e.g., by going to a home page for the user or therecord. As described above, a user can also subscribe (follow) to useror record and receive the feed items of those feeds through a separatefeed application (e.g. in a page or window), which is termed “chatter”in certain examples. The feed application can provide each of the feedsthat a user is following in a single news feed.

A feed generator can refer to any software program running on aprocessor or a dedicated processor (or combination thereof) that cangenerate feed items (e.g. stories or messages) and combine them into afeed. In one embodiment, the feed generator can generate a feed item byreceiving a story or message, identifying what feeds the item should beadded to, and adding the feed. Adding the feed can include addingadditional information (metadata) to the story or message (e.g. adding adocument, sender of message, a determined importance, etc.). The feedgenerator can also check to make sure that no one sees stories for datathat they don't have access to see (e.g. according to sharing rules). Afeed generator can run at various times to pre-compute feeds or tocompute them dynamically, or combinations thereof.

In one embodiment, the feed generator can de-dupe events (i.e. preventduplicates) that may come in from numerous records (and users). Forexample, since a story can be published to multiple feeds (e.g. JohnChoe changed the Starbucks Account Status) and a person can besubscribed to both the Starbucks account and John Choe, embodiments canfilter out duplicates before adding or displaying the items in a newsfeed. Thus, the Feed Generator can collapse events with multiple recordsand users for a single transaction into a single story and ensure theright number of stories for the particular feed. In some embodiments, anaction by a user does not create a feed item for that user (e.g. for aprofile feed of that user), and it is only the feed of the object beingacted upon (e.g. updated) for which a feed item is created. Thus, thereshould not be duplicates. For example, if someone updates the status ofa record, the feed item is only for the record and not the user.

In one embodiment, processor 417 in FIG. 4 can identify an event thatmeets criteria for a story, and then generate the story. Processor 417can also identify a message. For example, an application interface canhave certain mechanisms for submitting a message (e.g. “submit” buttonson a profile page, detail page of a record, “comment” button on post),and use of these mechanisms can be used to identify a message to beadded to a table used to create a feed or added directly to a list offeed items ready for display.

A. Adding Items to a Pre-Computed Feed

In some embodiments, a feed of feed items is created before a userrequests the feed. Such an embodiment can run fast, but have highoverall costs for storage. In one embodiment, once a profile feed or arecord feed has been created, a feed item (messages and stories) can beadded to the feed. The feed can exist in the database system in avariety of ways, such as a related list. The feed can include mechanismsto remove items as well as add them.

As described above, a news feed can be an aggregated feed of all therecord feeds and profile feeds to which a user has subscribed. The newsfeed can be provided on the home page of the subscribing user.Therefore, a news feed can be created by and exist for a particularuser. For example, a user can subscribe to receive entity feeds ofcertain records that are of interest to the user, and to receive profilefeeds of people that are of interest (e.g. people on a same team, thatwork for the user, are a boss of the user, etc.). A news feed can tell auser about all the actions across all the records (and people) who haveexplicitly (or implicitly) subscribed to via the subscriptions center(described above).

In one embodiment, only one instance of each story is shown on a user'snews feed, even if the story is published in multiple entities to whichthe user is subscribed. In one aspect, there may be delays in publishingnews articles. For example, the delay may be due to queued up messagesfor asynchronous entity history persistence. Different feeds may havedifferent delays (e.g. delay for new feeds, but none of profile andentity feeds). In another embodiment, certain stories regarding asubscribed profile feed or an entity feed are not shown because the useris not allowed access, e.g. due to sharing rules (which restrict whichusers can see which data). Also, in one embodiment, data of the recordthat has been updated (which includes creation) can be provided in thefeed (e.g. a file or updated value of a feed can be added as a flashrendition).

Examples are provided below as how it can be determined which feed itemsto add to which news feeds. In one embodiment, the addition of items toa news feed is driven by the following user. For example, the user'sprofile can be checked to determine objects the user is following, andthe database may be queried to determine updates to these objects. Inanother embodiment, the users and records being followed drive theaddition of items to a news feed. Embodiments can also combine these andother aspects. In one embodiment, a database system can befollower-driven if the number of subscriptions (users and records theuser is following) is small. For example, since the number subscriptionsare small, then changes to a small number of objects need to be checkedfor the follower.

Regarding embodiments that are follower-driven, one embodiment can havea routine run for a particular user. The routine knows the users andrecords that the user is following. The routine can poll the databasesystem for new stories and messages about the users and records that arebeing followed. In one implementation, the polling can be implemented asqueries. In one embodiment, the routine can run at least partially (evenwholly) on a user device.

Regarding embodiments where a news feed is driven by the record (oruser) being followed, processor 417 can identify followers of the recordafter a feed item is added to the record feed. Processor 417 canretrieve a list of the followers from the database system. The list canbe associated with the record, and can be stored as a related list orother object that is a field or child of the record.

In one embodiment, profile and record feeds can be updated immediatelywith a new feed item after an action is taken or an event occurs. A newsfeed can also be updated immediately. In another embodiment, a news feedcan be updated in batch jobs, which can run at periodic times.

B. Dynamically Generating Feeds

In some embodiments, a feed generator can generate the feed itemsdynamically when a user requests to see a particular feed, e.g., aprofile feed, entity feed, or the user's news feed. In one embodiment,the most recent feed items (e.g. top 50) are generated first. In oneaspect, the other feed items can be generated as a background process,e.g., not synchronously with the request to view the feed. However,since the background process is likely to complete before a user gets tothe next 50 feed items, the feed generation may appear synchronous. Inanother aspect, the most recent feed items may or may not includecomments, e.g., that are tied to stories or posts.

In one embodiment, the feed generator can query the appropriate subsetof tables shown in FIG. 9A and/or other tables as necessary, to generatethe feed items for display. For example, the feed generator can querythe event history table 910 for the updates that occurred for aparticular record. The ID of the particular record can be matchedagainst the ID of the record. In one embodiment, changes to a whole setof records can be stored in one table. The feed generator can also queryfor status updates, posts, and comments, each of which can be stored indifferent parts of a record or in separate tables, as shown in FIG. 9A.What gets recorded in the entity history table (as well as what isdisplayed) can be controlled by a feed settings page in setup, which canbe configurable by an administrator and can be the same for the entireorganization, as is described above for custom feeds.

In one embodiment, there can be two feed generators. For example, onegenerator can generate the record and profile feeds and anothergenerator can generate news feeds. For the former, the feed generatorcan query identifiers of the record or the user profile. For the latter,the news feed generator can query the subscribed profile feeds andrecord feeds, e.g., user subscription table 940. In one embodiment, thefeed generator looks at a person's subscription center to decide whichfeeds to query for and return a list of feed items for the user. Thelist can be de-duped, e.g., by looking at the event number and valuesfor the respective table, such as field name or ID, comment ID, or otherinformation.

C. Adding Information to Feed History Tables

FIG. 10 is a flowchart of a method 1000 for saving information to feedtracking tables according to embodiments. In one embodiment, some of thesteps may be performed regardless of whether a specific event or part ofan event (e.g. only one field of an update is being tracked) is beingtracked. In various embodiments, a processor or set of processors(hardwired or programmed) can perform method 1000 and any other methoddescribed herein.

In step 1010, data indicative of an event is received. The data may havea particular identifier that specifies the event. For example, there maybe a particular identifier for a field update. In another embodiment,the transaction may be investigated for keywords identifying the event(e.g., terms in a query indicating a close, change field, or createoperations).

In step 1020, it is determined whether the event is being tracked forinclusion into feed tables. The determination of what is being trackedcan be based on a tenant's configuration as described above. In oneaspect, the event has an actor (person performing an event), and anobject of the event (e.g. record or user profile being changed).

In step 1030, the event is written to an event history table (e.g. table910). In one embodiment, this feed tracking operation can be performedin the same transaction that performs a save operation for updating arecord. In another embodiment, a transaction includes at least tworoundtrip database operations, with one roundtrip being the databasesave (write), and the second database operation being the saving of theupdate in the history table. In one implementation, the event historytable is chronological. In another implementation, if user A posts onuser B's profile, then user A is under the “created by” 913 and user Bis under the object ID 912.

In step 1040, a field change table (e.g. field change table 920) can beupdated with an entry having the event identifier and fields that werechanged in the update. In one embodiment, the field change table is achild table of the event history table. This table can includeinformation about each of the fields that are changed. For example, foran event that changes the name and balance for an account record, anentry can have the event identifier, the old and new name, and the oldand new balance. Alternatively, each field change can be in a differentrow with the same event identifier. The field name or ID can also beincluded to determine which field the values are associated.

In step 1050, when the event is a post, a post table (e.g. post table950) can be updated with an entry having the event identifier and textof the post. In one embodiment, the field change table is a child tableof the event history table. In another embodiment, the text can beidentified in the transaction (e.g. a query command), stripped out, andput into the entry at the appropriate column. The various tablesdescribed herein can be combined or separated in various ways. Forexample, the post table and the field change table may be part of thesame table or distinct tables, or may include overlapping portions ofdata.

In step 1060, a comment is received for an event and the comment isadded to a comment table (e.g. comment table 930). The comment could befor a post or an update of a record, from which a story can be generatedfor display. In one embodiment, the text can be identified in thetransaction (e.g. a query command), stripped out, and put into the entryat the appropriate column.

D. Reading Information from Feed History Tables

FIG. 11 is a flowchart of a method 1100 for reading a feed item as partof generating a feed for display according to embodiments. In oneembodiment, the feed item may be read as part of creating a feed for arecord.

In step 1110, a query is received for an event history table (e.g. eventhistory table 910) for events related to a particular record. In oneembodiment, the query includes an identifier of the record for which thefeed is being requested. In various embodiments, the query may beinitiated from a detail page of the record, a home page of a userrequesting the record feed, or from a listing of different records (e.g.obtained from a search or from browsing).

In step 1120, the user's security level can be checked to determine ifthe user can view the record feed. Typically, a user can view a recordfeed, if the user can access the record. This security check can beperformed in various ways. In one embodiment, a first table is checkedto see if the user has a classification (e.g. a security level thatallows him to view records of the given type). In another embodiment, asecond table is checked to see if the user is allowed to see thespecific record. The first table can be checked before the second table,and both tables can be different sections of a same table. If the userhas requested the feed from the detail page of the record, oneembodiment can skip the security level check for the record since thecheck was already done when the user requested to view the detail page.

In one embodiment, a security check is determined upon each request toview the record feed. Thus, whether or not a feed item is displayed to auser is determined based on access rights, e.g., when the user requeststo see a feed of a record or a news feed of all the objects the user isfollowing. In this manner, if a user's security changes, a feedautomatically adapts to the user's security level when it is changed. Inanother embodiment, a feed can be computed before being requested and asubsequent security check can be made to determine whether the personstill has access right to view the feed items. The security (access)check may be at the field level, as well as at the record level.

In step 1130, if the user can access the record, the a field levelsecurity table can be checked to determine whether the user can seeparticular fields. In one implementation, only those fields aredisplayed to the user. Alternatively, a subset of those the user hasaccess to is displayed. The field level security check may optionally beperformed at the same time and even using the same operation as therecord level check. In addition, the record type check may also beperformed at this time. If the user can only see certain fields, thenany feed items related to those fields (e.g. as determined from fieldchange table 920) can be removed from the feed being displayed.

In step 1140, the feed items that the user has access to are displayed.In one embodiment, a predetermined number (e.g. 20) of feed items aredisplayed at a time. The method can display the first 20 feed items thatare found to be readable, and then determine others while the user isviewing the first 20. In another embodiment, the other feed items arenot determined until the user requests to see them, e.g., by activatinga see more link.

FIG. 12 is a flowchart of a method 1200 for reading a feed item of aprofile feed for display according to embodiments. In one embodiment,the query includes an identifier of the user profile feed that is beingrequested. Certain steps may be optional, as is also true for othermethods described herein. For example, security checks may not beperformed.

In step 1210, a query is directed to an event history table (e.g. eventhistory table 910) for events having a first user as the actor of theevent (e.g. creation of an account) or on which the event occurred (e.g.a post to the user's profile). In various embodiments, the query may beinitiated by a second user from the user's profile page, a home page ofa user requesting the profile feed (e.g. from a list of users beingfollowed), or from a listing of different users (e.g. obtained from asearch or from browsing). Various mechanisms for determining aspects ofevents and obtaining information from tables can be the same across anyof the methods described herein.

In step 1220, a security check may also be performed on whether thesecond user can see the first user's profile. In one embodiment any usercan see the profile of another user of the same tenant, and step 1220 isoptional.

In step 1230, a security (access) check can be performed for the storiesbased on record types, records, and/or fields, as well security checksfor messages. In one embodiment, only the stories related to recordsthat the person has updated are the ones that need security check as thefeed items about the user are readable by any user of the same tenant.Users of other tenants are not navigable, and thus security can beenforced at a tenant level. In another embodiment, messages can bechecked for keywords or links to a record or field that the second userdoes not have access.

As users can have different security classifications, it is importantthat a user with a low-level security cannot see changes to records thathave been performed by a user with high-level security. In oneimplementation, each feed item can be checked and then the viewableresults displayed, but this can be inefficient. For example, such asecurity check may take a long time, and the second user would like toget some results sooner rather than later. The following stepsillustrate one embodiment of how security might be checked for a firstuser that has a lot of feed items, but the second user cannot see mostof them. This embodiment can be used for all situations, but can beeffective in the above situation.

In step 1231, a predetermined number of entries are retrieved from theevent history table (e.g. starting from the most recent, which may bedetermined from the event identifier). The retrieved entries may just beones that match the user ID of the query. In one embodiment, entries arechecked to find the entries that are associated with the user and with arecord (i.e. not just posts to the user account). In another embodiment,those entries associated with the user are allowed to be viewed, e.g.because the second user can see the profile of the first user asdetermined in step 1220.

In step 1232, the record identifiers are organized by type and the typeis checked on whether the second user can see the record types. Otherchecks such as whether a record was manually shared (e.g. by the owner)can also be performed. In one embodiment, the queries for the differenttypes can be done in parallel.

In step 1233, if a user can see the record type, then a check can beperformed on the specific record. In one embodiment, if a user can see arecord type, then the user can see all of the records of that type, andso this step can be skipped. In another embodiment, the sharing modelcan account for whether a user below the second user (e.g. the seconduser is a manager) can see the record. In such an embodiment, the seconduser may see such a record. In one implementation, if a user cannot seea specific record, then comments on that record are also not viewable.

In step 1234, field level sharing rules can be used to determine whetherthe second user can see information about an update or value of certainfields. In one embodiment, messages can be analyzed to determine ifreference to a particular field name is made. If so, then field levelsecurity can be applied to the messages.

In step 1280, steps 1231-1234 are repeated until a stopping criteria ismet. In one embodiment, the stopping criteria may be when a maximumnumber (e.g. 100) of entries that are viewable have been identified. Inanother embodiment, the stopping criteria can be that a maximum number(e.g. 500) of entries from the entity history table have been analyzed,regardless of whether the entries are viewable or not.

In one embodiment, a news feed can be generated as a combination of theprofile feeds and the entity feeds, e.g. as described above. In oneimplementation, a list of records and user profiles for the queries insteps 1110 and 1210 can be obtained form user subscription table 940. Inone embodiment, there is a maximum number of objects that can befollowed.

In various embodiments, the entity history table can be queried for anyone or more of the following matching variables as part of determiningitems for a feed: CreatedDate, CreatedByld, CreatedBy.FirstName,CreatedBy.LastName, ParentId, and Parent.Name. The child tables can alsobe queried for any one or more of the following matching variables aspart of determining items for a feed: DataType, FieldName, OldValue, andNewValue. A query can also specify how the resulting feed items can besorted for display, e.g., by event number, date, importance, etc. Thequery can also include a number of items to be returned, which can beenforced at the server.

The two examples provided above can be done periodically to create thefeeds ahead of time or done dynamically at the time the display of afeed is requested. Such a dynamic calculation can be computationallyintensive for a news feed, particularly if many users and records arebeing followed, although there can be a low demand for storage.Accordingly, one embodiment performs some calculations ahead of time andstores the results in order to create a news feed.

E. Partial Pre-Computing of Items for a Feed

FIG. 13 is a flowchart of a method 1300 of storing event information forefficient generation of feed items to display in a feed according toembodiments. In various embodiments, method 1300 can be performed eachtime an event is written to the events history table, or periodicallybased on some other criteria (e.g. every minute, after five updates havebeen made, etc.).

In step 1310, data indicative of an event is received. The data may bethe same and identified in the same way as described for step 1010. Theevent may be written to an event history table (e.g. table 910).

In step 1320, the object(s) associated with the event are identified. Invarious embodiments, the object may be identified by according tovarious criteria, such as the record being changed, the user changingthe record, a user posting a message, and a user whose profile themessage is being posted to.

In step 1330, the users following the event are determined. In oneembodiment, one or more objects that are associated with the event areused to determine the users following the event. In one implementation,a subscription table (e.g. table 940) can be used to find the identifiedobjects. The entries of the identified objects can contain an identifier(e.g. user ID 941) of each the users following the object

In step 1340, the followers of the event are written to a news feedtable along with an event identifier. In one embodiment, each followeris added as a separate entry into the news feed table along with theevent ID. In another embodiment, each of the events for a user is addedas a new column for the row of the user. In yet another embodiment, morecolumns (e.g. columns from the other tables) can be added.

News feed table 960 shows an example of such a table with user ID 961and event ID or pointer 962. The table can be organized in any manner.One difference from event history table 910 is that one event can havemultiple entries (one for each subscriber) in the news feed table 960.In one embodiment, all of the entries for a same user are groupedtogether, e.g., as shown. The user U819 is shown as following events E37and E90, and thus any of the individual feed items resulting from thoseevents. In another embodiment, any new entries are added at the end ofthe table. Thus, all of the followers for a new event can be added as agroup. In such an embodiment, the event IDs would generally be groupedtogether in the table. Of course, the table can be sorted in anysuitable manner.

In an embodiment, if the number of users is small, then the feed itemsin one or more of the tables may be written as part of the same writetransaction. In one implementation, the determination of small dependson the number of updates performed for the event (e.g. a maximum numberof update operations may be allowed), and if more operations areperformed, then the addition of the feed items is performed. In oneaspect, the number of operations can be counted by the number of rows tobe updated, including the rows of the record (which depends on theupdate event), and the rows of the history tables, which can depend onthe number of followers. In another embodiment, if the number of usersis large, the rest of the feed items can be created by batch. In oneembodiment, the feed items are always written as part of a differenttransaction, i.e., by batch job.

In one embodiment, security checks can be performed before an entry isadded to the news feed table 960. In this manner, security checks can beperformed during batch jobs and may not have to be performed at the timeof requesting a news feed. In one implementation, the event can beanalyzed and if access is not allowed to a feed item of the event, thenan entry is not added. In one aspect, multiple feed items for a sameuser may not result from a same event (e.g. by how an event is definedin table 910), and thus there is no concern about a user missing a feeditem that he/she should be able to view.

In step 1350, a request for a news feed is received from a user. In oneembodiment, the request is obtained when a user navigates to the user'shome page. In another embodiment, the user selects a table, link, orother page item that causes the request to be sent.

In step 1360, the news feed table and other tables are accessed toprovide displayable feed items of the news feed. The news feed can thenbe displayed. In one embodiment, the news feed table can then be joinedwith the event history table to determine the feed items. For example,the news feed table 960 can be searched for entries with a particularuser ID. These entries can be used to identify event entries in eventhistory table 910, and the proper information from any child tables canbe retrieved. The feed items (e.g., stories and messages) can then begenerated for display.

In one embodiment, the most recent feed items (e.g. 100 most recent) aredetermined first. The other feed items may then be determined in a batchprocess. Thus, the feed item that a user is most likely to view can comeup first, and the user may not recognize that the other feed items arebeing done in batch. In one implementation, the most recent feed itemscan be gauged by the event identifiers. In another embodiment, the feeditems with a highest importance level can be displayed first. Thehighest importance being determined by one or more criteria, such as,who posted the feed item, how recently, how related to other feed items,etc.

In one embodiment where the user subscription table 940 is used todynamically create a news feed, the query would search the subscriptiontable, and then use the object IDs to search the event history table(one search for each object the user is following). Thus, the query forthe news feed can be proportional to the number of objects that one wassubscribing to. The news feed table allows the intermediate step ofdetermining the object IDs to be done at an earlier stage so that therelevant events are already known. Thus, the determination of the feedis no longer proportional to the number of object being followed.

In some embodiments, a news feed table can include a pointer (as opposedto an event identifier) to the event history table for each event thatis being followed by the user. In this manner, the event entries canimmediately be retrieved without having to perform a search on the eventhistory table. Security checks can be made at this time, and the textfor the stories can be generated.

X. Display of a Feed

Feeds include messages and stories and can show up in many places in anapplication interface with the database system. In one embodiment, feedscan be scoped to the context of the page on which they are beingdisplayed. For example, how a story is presented can vary depending onwhich page it is being displayed (e.g. in news feeds, on a detail pageof a record, and even based on how the user ended up at a particularpage). In another embodiment, only a finite number of feed items aredisplayed (e.g. 50). In one implementation, there can be a limitspecifically on the number of stories or messages displayed.Alternatively, the limit can be applied to particular types of storiesor messages. For example, only the most recent changes (e.g. 5 mostrecent) for a field may be displayed. Also, the number of fields forwhich changes are displayed can also be limited. Such limits can also beplaced on profile feeds and news feeds. In one embodiment, feed itemsmay also be subject to certain filtering criteria before beingdisplayed, e.g., as described below.

A. Sharing Rules for Feeds

As mentioned above, a user may not be allowed to see all of the recordsin the database, and not even all of the records of the organization towhich the user belongs. A user can also be restricted from viewingcertain fields of a record that the user is otherwise authorized toview. Accordingly, certain embodiments use access rules (also calledsharing rules and field-level security FLS) to ensure that a user doesnot view a story or message that the user is not authorized to see. Afeed of a record can be subject to the same access rules as the parentrecord.

In one embodiment, access rules can be used to prevent subscription to arecord that the user cannot see. In one implementation, a user can see arecord, but only some of the fields. In such instances, only items aboutfields that the user can access may be displayed. In another embodiment,sharing rules and FLS are applied before a feed item is being added to afeed. In another embodiment, sharing rules and FLS are applied after afeed item has been added and when the feed is being displayed. When arestriction of display is mentioned, the enforcement of access rules mayoccur at any stage before display.

In some implementations, the access rules can be enforced when a queryis provided to a record or a user's profile to obtain feed items for anews feed of a user. The access rules can be checked andcross-references with the feed items that are in the feed. Then, thequery can only return feed items for which the user has access.

In other implementations, the access rules can be enforced when a userselects a specific profile feed or record feed. For example, when a userarrives on a home page (or selects a tab to see the record feed), thedatabase system can check to see which feed items the user can see. Insuch an embodiment, each feed item can be associated with metadata thatidentifies which field the feed item is about. Thus, in one embodiment,a story is not visible unless the associated record and/or field arevisible to the user.

In one example, when a user accesses a feed of a record, an access checkcan be performed to identify whether the user can access the object typeof the record. In one implementation, users are assigned a profile type,and the profile type is cross-referenced (e.g. by checking a table) todetermine whether the profile type of the user can see the object typeof the record.

In some embodiments, access to specific records can be checked, e.g.,after it has been determined that the user can access the record type.Rules can be used to determine the records viewable by a user. Suchrules can determine the viewable records as a combination of thoseviewable by profile type, viewable due to a profile hierarchy (e.g. aboss can view records of profile types lower in the hierarchy), andviewable by manual sharing (e.g. as may be done by an owner of arecord). In one embodiment, the records viewable by a user can bedetermined beforehand and stored in a table. In one implementation, thetable can be cross-referenced by user (or profile type of a user) toprovide a list of the records that the user can see, and the list can besearched to determine if the record at issue is among the list. Inanother implementation, the table can be cross-referenced by record todetermine a list of the profile types that can access the record, andthe list can be searched to find out if the requesting user is in thelist. In another embodiment, the records viewable by a user can bedetermined dynamically at the time of the access check, e.g., byapplying rules to data (such as user profile and hierarchy information)obtained from querying one or more tables.

In other embodiments, checks can be made as to whether a user has accessto certain fields of a record, e.g., after it has been determined thatthe user can access the record. In one aspect, the access check onfields can be performed on results already obtained from the database,to filter out fields that the user cannot see. In one embodiment, thefields associated with retrieved feed items are determined, and thesefields are cross-referenced with an access table that contains thefields accessible by the user (e.g. using the profile type of the user).Such an access table could also be a negative access table by specifyingfields that the user cannot see, as can other access tables mentionedherein. In one embodiment, the field level access table is stored incache at a server.

In one embodiment, a user can see the same fields across all records ofa certain type (e.g. as long as the user can see the record). In oneimplementation, there is a field level access table for each objecttype. The access table can be cross-referenced by user (e.g. via profiletype) or field. For example, a field can be identified along with theprofile types that can see the field, and it can be determined whetherthe user's profile type is listed. In another example, the user can befound and the fields to which the user has access can be obtained. Inanother embodiment, the accessible fields could be specified for eachrecord.

Regarding profile feeds and news feeds, a first user may perform anaction on a record, and a story may be generated and added to the firstuser's profile feed. A second user who is allowed to follow the firstuser may not have access rights to the record. Thus, the story can beexcluded from a news feed of the second user, or when the second userviews the first user's profile feed directly. In one embodiment, if auser is already on the detail page, then another access check (at leastat the record level) may optionally not be performed since a check wasalready done in order to view the detail page.

In some embodiments, for profile feeds and news feeds, the feed itemscan be organized by object type. It can then be determined whether therequesting user can access to those object types. Other access checkscan be done independently or in conjunction with these access checks, asis described above.

B. API Implementation

Various embodiments can implement the access rules in various ways. Inone embodiment, all recent feed items (or more generally events) areretrieved from a feed that is ready for display (e.g. after a feedgenerator performs formatting) or a table. Then, bulk sharing checks canbe applied on the retrieved items. The viewable feed items of the mostrecent set can then be displayed.

In another embodiment regarding a profile feed, for non-VAD (view alldata) users, i.e. users who can see everything, certain functions can beoverridden. In one implementation, a FROM clause in a query can beoverridden to be a pipelined function, e.g., with different parts of thequery being operated on at the same time, but with different operationsof a pipeline. This pipeline function can be given a row limit and themaximum number of sharing checks to run. It can loop, selecting the nextbatch of rows, run sharing checks against them in bulk, and pipe backany IDs which are accessible. In one aspect, in nearly all cases, theuser feed can contain accessible IDs so the sharing checks can pass onthe first loop. However, it is possible the sharing may have changedsuch that this user's access is greatly reduced. In one worst case,embodiments can run sharing checks on up to the maximum number ofsharing check rows (e.g. a default 500) and then terminate the functionwith the IDs which passed so far, possibly zero. Such an exampleincludes a low level person viewing profile feed of CEO.

In some embodiments, if the user has a small number of subscriptions(e.g. <25), then embodiments can first run sharing checks on those IDsand then drive the main query from those accessible IDs, as opposed to asemi join against the subscription and running sharing checks on theresulting rows. In other embodiments, FLS is enforced by building up aTABLE CAST of the accessible field IDs from the cached values. A mainquery can then join against this table to filter only accessible fields.

XI. Filtering and Searching Feeds

It can be possible that a user subscribes to many users and records,which can cause a user's news feed to be very long and include many feeditems. In such instances, it can be difficult for the user to read everyfeed item, and thus some important or interesting feed items may not beread. In some embodiments, filters may be used to determine which feeditems are added to a feed or displayed in the feed, even though a usermay be authorized to see more than what is displayed. Section VII.E alsoprovides a description of filtering based on criteria.

In one embodiment, an “interestingness” filter can function as a modulefor controlling/recommending which stories make it to the news feed whenthe number of items that a user subscribes to is large. In one suchembodiment, a user can specify a filter, which is applied to a user'snews feed or to record and profile feeds that the user requests.Different filters can be used for each. For example, processing can bedone on the news feed to figure out which stories are the most relevantto the user. One embodiment can use an importance level, as describedherein. Other embodiments can include a user specifying keywords for amessage and specifying which records or users are most important.

In one embodiment, a filter can be used that only allows certain feeditems to be added to a feed and/or to be displayed as part of a feed. Afilter can be used such that the removal or non-addition of certain feeditems automatically occur for any new feed items after the filtercriteria are entered. The filter criteria can also be addedretroactively. The criteria of such a filter can be applied via a querymechanism as part of adding a feed item to a table or displaying a feed,as described in sections above. In various embodiments, a user candirectly write a query or create the query through a graphical userinterface.

FIG. 14 is a flowchart of a method 1400 for creating a custom feed forusers of a database system using filtering criteria according toembodiments. Any of the following steps can be performed wholly orpartially with the database system, and in particular by one or moreprocessor of the database system.

In step 1410, one or more criteria specifying which feed items are to bedisplayed to a first user are received from a tenant. In one embodiment,the criteria specifies which items to add to the custom feed. Forexample, the criteria could specify to only include feed items forcertain fields of a record, messages including certain keywords, andother criteria mentioned herein. In another embodiment, the criteriaspecifies which items to remove from the custom feed. For example, thecriteria could specify not to include feed items about certain fields orincluding certain keywords.

In step 1420, the database system identifies feed items of one or moreselected objects that match the criteria. The feed items can be storedin the database, e.g., in one or more of the tables of FIG. 9A. In oneembodiment, the one or more selected objects are the objects that thefirst user is following. In another embodiment, the one or more selectedobjects is a single record whose record feed the first user isrequesting.

In step 1430, the feed items that match the criteria are displayed tothe first user in the custom feed. The generation of text for a storycan occur after the identification of the feed items (e.g. data for afield change) and before the display of the final version of the feeditem.

In one embodiment, the criteria is received before a feed item iscreated. In another embodiment, the criteria is received from the firstuser. In one aspect, the criteria may only used for determining feeds todisplay to the first user. In yet another embodiment, the criteria isreceived from a first tenant and applies to all of the users of thefirst tenant. Also, in an embodiment where a plurality of criteria arespecified, the criteria may be satisfied for a feed item if onecriterion is satisfied.

Some embodiments can provide mechanisms to search for feed items ofinterest. For example, the feed items can be searched by keyword, e.g.,as entered by a user. As another example, a tab (or other selectiondevice) can show feed items about or from a particular user. In oneimplementation, only messages (or even just comments) from a particularuser can be selected.

In another embodiment, a user can enter search criteria so that the feeditems currently displayed are searched and a new list of matching feeditems is displayed. A search box can be used to enter keywords.Picklists, menus, or other mechanisms can be used to select searchcriteria. In yet another embodiment, feed comments are text-indexed andsearchable. Feed comments accessibility and visibility can apply on thesearch operation too.

In one embodiment, when a user performs a search of feeds, there can bean implicit filter of the user (e.g., by user ID). This can restrict thesearch to only the news feed of the user, and thus to only record feedsand profile feeds that the user is subscribed. In another embodiment,searches can also be done across feeds of users and records that are notbeing subscribed.

Besides searching for feed items that match a criteria, one also couldsearch for a particular feed item. However, in one embodiment, a usercannot directly query a feed item or feed comment. In such anembodiment, a user can query to obtain a particular profile or recordfeed, and then navigate to the feed item (e.g. as child of the parentfeed). In another embodiment, the relationship from a feed to its parententity (e.g. a record or user profile) is uni-directional. That is auser can navigate from the feed to the parent but not vice versa.

In one embodiment, a user can directly query the child tables, e.g.,comment table 930. Thus, a user could search for comments only that userhas made, or comments that contain certain words. In another embodiment,a user can search for a profile feed of only one user. In yet anotherembodiment, a user can search for profile feeds of multiple users (e.g.by specifying multiple user names or IDs), which can be combined into asingle feed.

XII. Maintaining Records for Follower's Feeds

If every feed item is stored and maintained on a follower's feed or evenin the profile and/or record feeds, the amount of data to be storedcould be massive, enough to cause storage issues in the system. In oneembodiment, the N (e.g. 50) most recent feed items for each feed arekept. However, there can be a need to keep certain older feed items.Thus, embodiments can remove certain feed items, while keeping others.In other embodiments, old stories may be archived in a data storeseparate from where recent feed items are stored.

In some embodiments, feeds are purged by a routine (also called areaper) that can remove items deemed not worthy to keep (e.g. olditems). Any underlying data structures from which feed items are createdcan also be purged. In one embodiment, the reaper can remove certainitems when new items are added (e.g. after every 5^(th) item added). Asanother example, feed items may be deleted synchronously during the saveoperation itself. However, this may slow down each save operation. Inone embodiment, however, this may be better than incurring a larger costwhen the items are removed at longer intervals. In another embodiment,the reaper can run periodically as a batch process. Such routines canensure that a table size does not become too large. In one aspect, areaper routine can keep the event history table relatively small so thesharing checks are not extremely expensive.

In various embodiments, the reaper can maintain a minimum number (e.g.50 or 100) of feed items per record, maintain a minimum number ofrecords per user (e.g. per user ID), and not deleting feed items (orentire records) which have comments against it. Such embodiments canensure that the detail page and profile page have sufficient data todisplay in a feed. Note that the sharing checks for feed queries can cutdown the number of records further for users with less access. Thus, thenumber of records finally displayed for specific users can besignificantly less than a minimum number for a specific profile orrecord feed. In one embodiment, a reaper deletes data that is older thana specified time (e.g. 6 months or a year).

In one embodiment, the reaper can perform the deletion of feed items(purging) as a batch up deletion. This can avoid deletion of largenumber of records that may lead to locking issues. In anotherembodiment, the reaper can be run often so that the table does notbecome difficult to manage (e.g. size-wise). In this way the reaper canwork on a limited set of records. In one implementation, the reaper mayhave logic that deletes certain items (e.g. by an identification) fromtables (e.g. those in FIG. 9A), or sections of the tables.

The specific details of particular embodiments may be combined in anysuitable manner without departing from the spirit and scope ofembodiments of the invention. However, other embodiments of theinvention may be directed to specific embodiments relating to eachindividual aspect, or specific combinations of these individual aspects.

It should be understood that any of the embodiments of the presentinvention can be implemented in the form of control logic using hardwareand/or using computer software in a modular or integrated manner. Basedon the disclosure and teachings provided herein, a person of ordinaryskill in the art will know and appreciate other ways and/or methods toimplement embodiments of the present invention using hardware and acombination of hardware and software.

Any of the software components or functions described in thisapplication may be implemented as software code to be executed by aprocessor using any suitable computer language such as, for example,Java, C++ or Perl using, for example, conventional or object-orientedtechniques. The software code may be stored as a series of instructionsor commands on a computer readable medium for storage and/ortransmission, suitable media include random access memory (RAM), a readonly memory (ROM), a magnetic medium such as a hard-drive or a floppydisk, or an optical medium such as a compact disk (CD) or DVD (digitalversatile disk), flash memory, and the like. The computer readablemedium may be any combination of such storage or transmission devices.

Such programs may also be encoded and transmitted using carrier signalsadapted for transmission via wired, optical, and/or wireless networksconforming to a variety of protocols, including the Internet. As such, acomputer readable medium according to an embodiment of the presentinvention may be created using a data signal encoded with such programs.Computer readable media encoded with the program code may be packagedwith a compatible device or provided separately from other devices(e.g., via Internet download). Any such computer readable medium mayreside on or within a single computer program product (e.g. a hard driveor an entire computer system), and may be present on or within differentcomputer program products within a system or network. A computer systemmay include a monitor, printer, or other suitable display for providingany of the results mentioned herein to a user.

Any of the methods described herein may be totally or partiallyperformed with a computer system including a processor, which can beconfigured to perform the steps. Thus, embodiments can be directed tocomputer systems configured to perform the steps of any of the methodsdescribed herein, potentially with different components performing arespective steps or a respective group of steps. Although presented asnumbered steps, steps of methods herein can be performed at a same timeor in a different order. Additionally, portions of these steps may beused with portions of other steps from other methods. Also, all orportions of a step may be optional. Additionally, any of the steps ofany of the methods can be performed with modules, circuits, or othermeans for performing these steps.

The above description of exemplary embodiments of the invention has beenpresented for the purposes of illustration and description. It is notintended to be exhaustive or to limit the invention to the precise formdescribed, and many modifications and variations are possible in lightof the teaching above. The embodiments were chosen and described inorder to best explain the principles of the invention and its practicalapplications to thereby enable others skilled in the art to best utilizethe invention in various embodiments and with various modifications asare suited to the particular use contemplated.

What is claimed is:
 1. A method of tracking events in a database systemto provide feeds to users of the database system, the method comprising:receiving data indicative of a plurality of events, one of the eventsbeing a change in a field of a first record from an old value to a newvalue, the first record being a customer relationship management (CRM)record storing CRM data, the change being associated with a first user,the first user at a first level of an organizational hierarchy; thedatabase system determining when the one event is being tracked byanalyzing the event; and when the event is being tracked, adding a newentry into an event history table, the new entry including: an eventidentifier that identifies the event; and an object identifier thatidentifies an object updated by the event, the object updated by theevent being the first record; the field change being indicated by one ofa plurality of feed items of a feed associated with a second user, thefeed configured to be displayed on a display of a computing device, theone feed item being positioned relative to other feed items in thedisplay of the feed according to an importance level determined byapplication of one or more criteria to the event, one of the criteriabeing a change in percentage of the old value to the new value of thefield of the first record being above a threshold percentage, the seconduser being at a second level of the organizational hierarchy, the firstlevel of the organizational hierarchy being at a lower level than thesecond level of the organizational hierarchy.
 2. The method of claim 1,the method further comprising: storing the old value of the field andthe new value of the field in a field change table.
 3. The method ofclaim 2, wherein the old value and the new value are stored in the fieldchange table along with the event identifier.
 4. The method of claim 1,wherein the object updated by a first event is a first user's profile,and wherein the first event is a message to first user's profile, themethod further comprising: storing text of the message in a second tablealong with the event identifier.
 5. The method of claim 1, furthercomprising: receiving an event that includes a comment on another event;and storing the comment into a third table along with the eventidentifier.
 6. The method of claim 1, further comprising: receiving,from a first tenant, criteria that specifies events in the event historytable as tracked events.
 7. The method of claim 1, further comprising:when the event is being tracked, determining one or more users followingthe object updated by the event; and associating the one or more userswith the event.
 8. The method of claim 7, wherein associating a userwith the event includes: adding a user identifier and the eventidentifier to a same entry of a table.
 9. The method of claim 8, whereineach user following the object is added as a separate entry to a newsfeed table, wherein each separate entry includes the respective useridentifier and the event identifier.
 10. A computer program productcomprising a non-transitory computer readable medium storing a pluralityof instructions for controlling a processor to perform an operation oftracking events in a database system to provide feeds to users of thedatabase system, the instructions comprising: determining when one of aplurality of events is being tracked by analyzing the event, the eventbeing a change in a field of a first record from an old value to a newvalue, the first record being a customer relationship management (CRM)record storing CRM data, the change being associated with a first user,the first user at a first level of an organizational hierarchy; and whenthe event is being tracked, adding a new entry into an event historytable, the new entry including: an event identifier that identifies theevent; and an object identifier that identifies an object updated by theevent, the object updated by the event being the first record; the fieldchange being indicated by one of a plurality of feed items of a feedassociated with a second user, the feed configured to be displayed on adisplay of a computing device, the one feed item being positionedrelative to other feed items in the display of the feed according to animportance level determined by application of one or more criteria tothe event, one of the criteria being a change in percentage of the oldvalue to the new value of the field of the first record being above athreshold percentage, the second user being at a second level of theorganizational hierarchy, the first level of the organizationalhierarchy being at a lower level than the second level of theorganizational hierarchy.
 11. The computer program product of claim 10,wherein the instructions further comprise: receiving, from a first user,a request to view a feed of one or more objects; querying the eventhistory table using identifiers associated with the one or more objectsto obtain a plurality of events; obtaining one or more feed itemscorresponding to each event; and displaying the obtained one or morefeed items.
 12. A database system comprising: a database storing anevent history table; and a server including one or more processorsconfigured to execute instructions to: determine when one of a pluralityof events is being tracked by analyzing the event, the event being achange in a field of a first record from an old value to a new value,the first record being a customer relationship management (CRM) recordstoring CRM data, the change being associated with a first user, thefirst user at a first level of an organizational hierarchy; and when theevent is being tracked, providing an entry in the event history table,the entry including: an event identifier that identifies the event, andan object identifier that identifies an object updated by the event, theobject updated by the event being the first record; the field changebeing indicated by one of a plurality of feed items of a feed associatedwith a second user, the feed configured to be displayed on a display ofa computing device, the one feed item being positioned relative to otherfeed items in the display of the feed according to an importance leveldetermined by application of one or more criteria to the event, one ofthe criteria being a change in percentage of the old value to the newvalue of the field of the first record being above a thresholdpercentage, the second user being at a second level of theorganizational hierarchy, the first level of the organizationalhierarchy being at a lower level than the second level of theorganizational hierarchy.
 13. The method of claim 1, wherein thecriteria include one or more of: an identification of a user who posteda feed item, a time a feed item was posted, and an indication of a firstfeed item as being related to a second feed item.
 14. The method ofclaim 1, wherein the CRM record is one of: an account, a case, acontact, a lead, and an opportunity.